Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Dzitskiy/c68bd9a294d93825665d621bc6bf2b53 to your computer and use it in GitHub Desktop.

Select an option

Save Dzitskiy/c68bd9a294d93825665d621bc6bf2b53 to your computer and use it in GitHub Desktop.
Cli commands to create a hello world solution with one console project and one test project, that also runs the app and tests. Works for osx!
mkdir HelloWorld
cd HelloWorld
dotnet new sln --name HelloWorld
dotnet new console --name HelloWorld
dotnet new nunit --name HelloWorld.UnitTests
dotnet sln add HelloWorld/HelloWorld.csproj
dotnet sln add HelloWorld.UnitTests/HelloWorld.UnitTests.csproj
dotnet build
dotnet test
dotnet run --project HelloWorld
dotnet HelloWorld/bin/Debug/netcoreapp3.1/HelloWorld.dll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment