https://github.com/arnab-developer/dotnet-cli
Create .NET projects with Visual Studio and CLI
https://github.com/arnab-developer/dotnet-cli
dot-net-5 dotnet-cli visual-studio
Last synced: 3 months ago
JSON representation
Create .NET projects with Visual Studio and CLI
- Host: GitHub
- URL: https://github.com/arnab-developer/dotnet-cli
- Owner: Arnab-Developer
- License: mit
- Created: 2021-02-14T15:44:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-21T07:40:56.000Z (about 4 years ago)
- Last Synced: 2025-01-17T02:24:21.416Z (5 months ago)
- Topics: dot-net-5, dotnet-cli, visual-studio
- Language: C#
- Homepage:
- Size: 664 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Create .NET projects with Visual Studio and CLI

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.
## Solution structure
* Class library
* Web application in MVC
* Unit test for class library
* Unit test for web application## Tech stack
* .NET 5
* C# 9
* xUnit for unit testing
* Visual Studio 2019
* .NET CLI## .NET CLI commands
The following commands are used to build the projects in 'CreatedWithCli' folder.
```
mkdir CreatedWithClidotnet new sln --name CreatedWithCli
mkdir CreatedWithCli.Lib
cd CreatedWithCli.Lib
dotnet new classlibcd..
mkdir CreatedWithCli.LibTest
cd CreatedWithCli.LibTest
dotnet new xunit
dotnet add reference ..\CreatedWithCli.Lib\CreatedWithCli.Lib.csprojcd..
mkdir CreatedWithCli.WebApp
cd CreatedWithCli.WebApp
dotnet new mvc
dotnet add reference ..\CreatedWithCli.Lib\CreatedWithCli.Lib.csprojcd..
mkdir CreatedWithCli.WebAppTest
cd CreatedWithCli.WebAppTest
dotnet new xunit
dotnet add reference ..\CreatedWithCli.WebApp\CreatedWithCli.WebApp.csproj
dotnet add package Moqcd..
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.csprojdotnet restore
dotnet build
dotnet test
```