Dotnet Core command-line operations

.Net core is Microsoft's wonderfully refurbished new open source-cross platform successor for the now 20 year old .NET Framework. There are a lot of improvements such as the core of the framework not being as monolithic as its ancestor but more relies on NuGet for expanding. Being cross platform it works with docker for Linux and thus making it a natural choice over .NET Framework in the new age of Big Cloud computing.
But some of the greatest features is it's brand new and very consistent CLI tools. For command line and Vim geeks like myself this is very liberating. Even though you could run msbuild with .NET framework, this is completely different.
This article will show a brief example of a typical setup of a solution and different projects.
The order of which you do these are not important.
Create solution file
The solution file is actually optional in dotnet core, but it's an advantage if you plan to open the solution with full Visual Studio. In addition it gives you the option to build the entire solution in one command. Microsoft docs on dotnet sln
mkdir mysolutionfolder
cd mysolutionfolder
dotnet new slnCreate console app
mkdir consoleapp
cd consoleapp
dotnet new consoleAdd console app to solution
cd ..
dotnet sln add consoleappRun console App
cd console
dotnet runCreate web app
mkdir web
cd web
dotnet new webappCreate class library
mkdir lib
cd lib
dotnet new classlibAdd more projects to solution
cd ..
dotnet sln add web
dotnet sln add libAdd references in the solution
cd web
dotnet add reference ../classlibAdd nuget package
cd web
dotnet add package Microsoft.Extensions.Logging.AzureAppServicesList projects in solution
dotnet sln listBuild and run
Works both on solution and project level
dotnet build
dotnet run