Dotnet Core Cheat Sheet
This cheat sheet is courtesy Ben Day and is available here. This Markdown file is just for easy reference for programmers.
What follows are the excerpts from Ben's blog.
The nice thing about the items on this ‘cheat sheet’ is that they work on Windows, Mac, and Linux. [Note 2/13/2017: Want an example script? Check this out.
Create a new Solution (*.sln)
dotnet new sln
Create a new Class Library (*.csproj):
dotnet new classlib
Create a new Class Library (*.csproj) targeting .NET Core
dotnet new classlib -f netcoreapp1.1
Create a new ASP.NET MVC project:
dotnet new mvc
Create a new ASP.NET MVC project targeting .NET Core
dotnet new mvc -f netcoreapp1.1
Create a new MSTest unit test project targeting .NET Core
dotnet new mstest -f netcoreapp1.1
Add a project (.csproj) to a Solution (.sln)
dotnet sln MySolutionFile.sln add .\src\MySolution.WebUi\MySolution.WebUi.csproj
Add a reference from one Project to another
dotnet add reference ..\MySolution.Api\MySolution.Api.csproj
Restore NuGet dependencies so that you can be ready to do a build
dotnet restore
Use dotnet to do a build
dotnet build