Files
JesperTreetopandStephen Toub 104abd7fe7 Prevent DivideByZeroException in EventCounter.ToString() (#27581)
* Prevent DivideByZeroException in EventCounter.ToString()

Maybe it should print something other than 0. Maybe "Mean" should be excluded. But at least with this it doesn't divide by zero. Ternary operator in interpolated string is not super readable; didn't know if making the code more descriptive would have performance implications.

* Update src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventCounter.cs

Co-Authored-By: Stephen Toub <[email protected]>

Signed-off-by: dotnet-bot <[email protected]>
2019-11-05 21:18:22 +01:00
..
2019-06-20 14:07:13 +02: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