Last active
October 19, 2017 23:44
-
-
Save haruair/5a6e43fd6ca1da5ed9a8d51e7b400835 to your computer and use it in GitHub Desktop.
dotnet core project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir helloworld && cd helloworld | |
echo "# HelloWorld" > README.md | |
dotnet new sln -n HelloWorld | |
mkdir src test | |
dotnet new angular --output src/HelloWorld.WebApp --name HelloWorld.WebApp | |
dotnet new xunit --output test/HelloWorld.WebApp.Tests --name HelloWorld.WebApp.Tests | |
cd test/HelloWorld.WebApp.Tests | |
dotnet add reference ../../src/HelloWorld.WebApp/HelloWorld.WebApp.csproj | |
cd ../.. | |
# the namespace is something weird | |
# `.` is converted to underscore so manually fix it for the time being | |
find src -type f -name "*.cs*" -exec sed -i '' 's/HelloWorld_WebApp/HelloWorld.WebApp/g' {} + | |
dotnet sln add src/HelloWorld.WebApp/HelloWorld.WebApp.csproj | |
dotnet sln add test/HelloWorld.WebApp.Tests/HelloWorld.WebApp.Tests.csproj | |
cd src/HelloWorld.WebApp | |
dotnet restore | |
npm install | |
dotnet run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note...