Skip to content

Instantly share code, notes, and snippets.

@dbaltas
Created May 6, 2020 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbaltas/5bf162aaa2df919aa2f2e3d706447935 to your computer and use it in GitHub Desktop.
Save dbaltas/5bf162aaa2df919aa2f2e3d706447935 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