When starting out building applications with .Net Core, it's very easy to spin up a new project using "dotnet new" and start writing code however when it comes to creating more complex solutions spanning multiple projects.

Unfortunately Visual Studio Code and other cross platform editors don't provide as much help with this as the full version of Visual Studio on PC. Thankfully the .Net Core SDK comes loaded with a command line interface (CLI) that provides functionality for most of the common actions which are.

Create new solution
// uses current dir name
dotnet new sln

// specify a solution name
dotnet new sln --name mysolution  
Create new project
dotnet new [type]  
dotnet new [type] --name myproject

project types: web, mvc, webapi, classlib, mstest, xunit, webconfig  
Manage projects in solution
dotnet sln mysolution.sln add path/myproject.csproj  
dotnet sln mysolution.sln add path1/proj1.csproj path2/proj2.csproj

dotnet sln mysolution.sln remove path/myproject.csproj  
dotnet sln mysolution.sln remove path1/proj1.csproj path2/proj2.csproj

// shows all projects in solution
dotnet sln mysolution.sln list  
Manage nuget packages in a project
dotnet add package packagename  
dotnet add myproj.csproj package packagname

dotnet remove package packagename  
dotnet remove myproj.csproj package packagename  
Manage references in a project
dotnet add reference path/myproject.csproj  
dotnet add myproject.csproj reference path/myref.csproj

dotnet remove reference path/myproject.csproj  
dotnet remove myproject.csproj reference path/myref.csproj

// list all references in csproj
dotnet list reference  
dotnet list myproject.csproj reference  
Build & run solutions
// commands
dotnet restore  
dotnet clean  
dotnet build  
dotnet run

// target specific project
dotnet [command] -p myproject/myproject.csproj

// build in release mode
dotnet [command] -c release  
Deploy a solution
dotnet pack  
dotnet pack path/myproj.csproj

//use release mode
dotnet pack -c release

// outputs myproj.1.0.0-Preview.nupkg
dotnet pack path/myproj.csproj --version-suffix Preview

dotnet publish  
dotnet publish -p myproj.csproj  
dotnet publish -c release  
Adding new classes/files

The .Net Core CLI doesn't provide functionality to create new class files yet however Omnisharp's C# extension for Visual Studio Code enables you to right click and create these files.

Hopefully some of you can find some value in this .Net CLI crash course and that it helps you familiarise yourself with the CLI in a short space of time.