-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-System.RuntimeenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-reliabilityReliability/stability related issue (stress, load problems, etc.)Reliability/stability related issue (stress, load problems, etc.)
Milestone
Description
Scenario
- Running a
net451
app depending onSystem.Runtime.InteropServices.RuntimeInformation
on OSX/Ubuntu will produce the following exception at runtime:
dotnet -v run -f net451 1 ↵
Telemetry is: Enabled
Project RuntimeServiceOnMono (.NETFramework,Version=v4.5.1) was previously compiled. Skipping compilation.
Running /usr/local/bin/mono --debug /Users/jtluo/Documents/workspace/juntaoluo/tp/RuntimeServiceOnMono/bin/Debug/net451/osx.10.11-x64/RuntimeServiceOnMono.exe
Process ID: 29130
Unhandled Exception:
System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop/Sys:GetUnixNamePrivate ()
at Interop+Sys.GetUnixName () [0x00000] in <filename unknown>:0
at System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform (OSPlatform osPlatform) [0x00000] in <filename unknown>:0
at ConsoleApplication.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop/Sys:GetUnixNamePrivate ()
at Interop+Sys.GetUnixName () [0x00000] in <filename unknown>:0
at System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform (OSPlatform osPlatform) [0x00000] in <filename unknown>:0
at ConsoleApplication.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
Example
See repro at https://github.com/JunTaoLuo/RuntimeServiceOnMono. To run the sample, run dotnet restore
and dotnet run -f net451
I understand Mono is not a scenario that's actively being developed for but we should not be causing a exception like this especially since we intend to use the InteropServices
APIs in often used ASP.NET packages like Logging.
Currently this means that most of our samples and apps cannot run on Mono (full CLR on *nix).
Environment
dotnet --version
:
Microsoft .NET Core Shared Framework Host
Version : 1.0.1-rc3-004312-00
Build : 1db6c07638a70a621b312e78d4dc9fb31a530f2f
mono -V
:
Mono JIT compiler version 4.0.5 ((detached/1d8d582 Tue Oct 20 15:15:33 EDT 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-(detached/a173357)
GC: sgen
Metadata
Metadata
Assignees
Labels
area-System.RuntimeenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstenet-reliabilityReliability/stability related issue (stress, load problems, etc.)Reliability/stability related issue (stress, load problems, etc.)