Create .net project from command line in windows

Open CMD in the folder
Type the following –
1. mkdir MySolution
2. cd MySolution
3. dotnet new sln –name MySolution
4. dotnet new webapi –output src/MyProject
5. dotnet sln add src/MyProject/MyProject.csproj
6. dotnet run –project src/MyProject/MyProject.csproj

To Add Class file –

dotnet new class -n CustMiddlware1 -o src/MyProject/

Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *