set "base=%cd%" set "workspaceroot=%base%\%1" echo %base% echo %workspaceroot% mkdir %workspaceroot% mkdir %workspaceroot%\src mkdir %workspaceroot%\src\%1.Api mkdir %workspaceroot%\src\%1.WebUi mkdir %workspaceroot%\test mkdir %workspaceroot%\test\%1.Tests cd %workspaceroot%\src\%1.Api dotnet new classlib -f netcoreapp1.1 cd %workspaceroot%\src\%1.WebUi dotnet new mvc -f netcoreapp1.1 cd %workspaceroot%\test\%1.Tests dotnet new mstest -f netcoreapp1.1 cd %workspaceroot% dotnet new sln dotnet sln .\%1.sln add .\src\%1.Api\%1.Api.csproj dotnet sln .\%1.sln add .\src\%1.WebUi\%1.WebUi.csproj dotnet sln .\%1.sln add .\test\%1.Tests\%1.Tests.csproj cd %workspaceroot%\src\%1.WebUi dotnet add reference ..\%1.Api\%1.Api.csproj cd %workspaceroot%\test\%1.Tests dotnet add reference ..\..\src\%1.Api\%1.Api.csproj dotnet add reference ..\..\src\%1.WebUi\%1.WebUi.csproj cd %workspaceroot% dotnet restore dotnet build