Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dotnet core project
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
@haruair

This comment has been minimized.

Copy link
Owner Author

haruair commented Oct 2, 2017

If you have an error on testing such as below, you need to increase open file limit via ulimit -n 4096.

No test is available in ~/helloworld/test/HelloWorld.WebApp.Tests/bin/Debug/netcoreapp2.0/HelloWorld.WebApp.Tests.dll.
Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

It usually happened when you watch the files via webpack.

@haruair

This comment has been minimized.

Copy link
Owner Author

haruair commented Oct 3, 2017

dotnet publish -c Release -r osx.10.12-x64 --self-contained
@haruair

This comment has been minimized.

Copy link
Owner Author

haruair commented Oct 19, 2017

Note...

mkdir haruair-simple && cd haruair-simple
echo "# Haruair" > README.md

dotnet new sln -n HaruairSimple
mkdir src test

dotnet new reactredux --output src/HaruairSimple.WebApp --name HaruairSimple.WebApp
dotnet new classlib --output src/HaruairSimple --name HaruairSimple
dotnet new xunit --output test/HaruairSimple.WebApp.Tests --name HaruairSimple.WebApp.Tests

cd src/HaruairSimple.WebApp
dotnet add reference ../../src/HaruairSimple/HaruairSimple.csproj
cd ../..

cd test/HaruairSimple.WebApp.Tests
dotnet add reference ../../src/HaruairSimple.WebApp/HaruairSimple.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/HaruairSimple_WebApp/HaruairSimple.WebApp/g' {} +

dotnet sln add src/HaruairSimple.WebApp/HaruairSimple.WebApp.csproj
dotnet sln add src/HaruairSimple/HaruairSimple.csproj
dotnet sln add test/HaruairSimple.WebApp.Tests/HaruairSimple.WebApp.Tests.csproj
cd src/HaruairSimple.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
You can’t perform that action at this time.