Netcore support in mono consists of two parts:
- The runtime compiled in netcore mode
- An implementation of System.Private.CoreLib
Everything below should be executed with the current dir set to 'netcore'.
For bootstrap, do ./build.sh
To rebuild the runtime, do make runtime
To rebuild System.Private.CoreLib, do make bcl
These two targets will copy the results into shared/Microsoft.NETCore.App/.
Run dotnet publish -c Release -r osx-x64
to create a published version of the app.
Copy
mono/mini/.libs/libmonosgen-2.0.dylib
into
bin/netcoreapp3.0/osx-x64/publish/libcoreclr.dylib
Copy
netcore/System.Private.CoreLib/bin/x86/System.Private.CoreLib.{dll,pdb}
to
bin/netcoreapp3.0/osx-x64/publish
DYLD_LIBRARY_PATH=shared/Microsoft.NETCore.App/ MONO_PATH=shared/Microsoft.NETCore.App/ ../mono/mini/mono-sgen --assembly-loader=strict sample/HelloWorld/bin/netcoreapp3.0/HelloWorld.dll
Change the DebugType to full in your .csproj full Enable debugger agent using the environment variable MONO_ENV_OPTIONS export MONO_ENV_OPTIONS="--debug --debugger-agent=transport=dt_socket,address=127.0.0.1:1235,server=y,suspend=y" Run ./dotnet --fx-version "5.0.0-alpha1.19409.2" sample/HelloWorld/bin/netcoreapp3.0/HelloWorld.dll