There are two ways to create projects in .NET, one is using Visual Studio and another is CLI. In this repo there is a folder named 'CreatedWithVs' in that all the projects are created with Visual Studio 2019 and another folder named 'CreatedWithCli' in that all the projects are created with CLI.
- Class library
- Web application in MVC
- Unit test for class library
- Unit test for web application
- .NET 5
- C# 9
- xUnit for unit testing
- Visual Studio 2019
- .NET CLI
The following commands are used to build the projects in 'CreatedWithCli' folder.
mkdir CreatedWithCli
dotnet new sln --name CreatedWithCli
mkdir CreatedWithCli.Lib
cd CreatedWithCli.Lib
dotnet new classlib
cd..
mkdir CreatedWithCli.LibTest
cd CreatedWithCli.LibTest
dotnet new xunit
dotnet add reference ..\CreatedWithCli.Lib\CreatedWithCli.Lib.csproj
cd..
mkdir CreatedWithCli.WebApp
cd CreatedWithCli.WebApp
dotnet new mvc
dotnet add reference ..\CreatedWithCli.Lib\CreatedWithCli.Lib.csproj
cd..
mkdir CreatedWithCli.WebAppTest
cd CreatedWithCli.WebAppTest
dotnet new xunit
dotnet add reference ..\CreatedWithCli.WebApp\CreatedWithCli.WebApp.csproj
dotnet add package Moq
cd..
dotnet sln add CreatedWithCli.Lib\CreatedWithCli.Lib.csproj
dotnet sln add CreatedWithCli.LibTest\CreatedWithCli.LibTest.csproj
dotnet sln add CreatedWithCli.WebApp\CreatedWithCli.WebApp.csproj
dotnet sln add CreatedWithCli.WebAppTest\CreatedWithCli.WebAppTest.csproj
dotnet restore
dotnet build
dotnet test