Skip to content

Instantly share code, notes, and snippets.

@eduherminio
Created September 15, 2020 18:06
Show Gist options
  • Save eduherminio/28f2ab7cdff0849b0e80e678a04f39ec to your computer and use it in GitHub Desktop.
Save eduherminio/28f2ab7cdff0849b0e80e678a04f39ec to your computer and use it in GitHub Desktop.
Basic .NET Core WebApi setup (.net core 3.1)
$projectName = ""
mkdir src && cd src
dotnet new classlib -n "$projectName"
dotnet new webapi -n "$projectName.Api"
cd ..
mkdir tests && cd tests
dotnet new xunit -n "$projectName.Test"
cd ..
dotnet new sln -n "${projectName}Solution"
dotnet sln add "tests/$projectName.Test"
dotnet sln add (ls -r src/*.csproj) --in-root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment