.NET Command Lines
- Create a folder.
mkdir net5-quickstart
- Create solution file.
dotnet new sln -n QuickStart
- Create project by template.
dotnet new webapi -n QuickStart
- Add project to solution.
dotnet sln QuickStart.sln add ./QuickStart/QuickStart.csproj
- Create test project, and add it to solution.
dotnet new xunit -n QuickStart.Tests
dotnet sln QuickStart.sln add ./QuickStart.Tests/QuickStart.Tests.csproj
Add a reference of main project to test project. dotnet add ./QuickStart.Tests/QuickStart.Tests.csproj reference ./QuickStart/QuickStart/csproj
CICD
dotnet build
dotnet test
dotnet run
dotnet run -p ./QuickStart/QuickStart.csproj
dotnet publish
References
- ASP.NET Core 3.1 Web API Quick Start
- Running A Visual Studio 2019 Solution In Visual Studio Code