Files
Zoltan Varga ecd67a91c4 [wasm] Add aot+netcore support. (#17798)
* [wasm] Compile corelib as 32 bit.

* [wasm] Add a netcore cross compiler.

* [wasm] Add netcore+aot support.

* [aot] Load the dedup module lazily instead of at startup.

The previous version didn't work on netcore because it couldn't resolve references to corlib etc.
since they were not yet registered in the root domain at the time of loading.

* Add more icall trampoline signatures.

* Add more netcore pinvokes.

* Fix the build.

* Add more icall trampoline signatures.

* Add an --embed-file option to the packager.

* Add more netcore pinvokes.

* [interp] Return FALSE for IsDynamicCodeCompiled.

* Add a netcore project and targets for running BenchmarkDotNet.

* Fix pinvoke tables.

* Add missing files.

* Fix make clean.

* Add a comment.

* Revert "Fix pinvoke tables."

This reverts commit 998065e77614b7e621d2873510aabc3930669ca9.

* Make xunit-runner into a dotnet project. Add a netcore version.
2019-11-22 12:42:55 +01:00
..
2019-06-20 14:07:13 +02:00
2019-06-20 14:07:13 +02:00

Introduction

Netcore support in mono consists of two parts:

  • The runtime compiled in netcore mode
  • An implementation of System.Private.CoreLib

Building

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/.

Running with netcore

Running through the 'dotnet' tool.

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

Running with the mono runtime executable

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

How to set up managed debugging

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