[Mono-dev] Cross Platform on Linux/Windows with Mono.Posix reference on Linux

Jason Curl jcurlnews at arcor.de
Mon Mar 28 11:05:04 UTC 2016


Hello,

How can I reference Mono.Posix on Linux and still allow compilation on 
Windows without installation of Mono or extra Linux specific assemblies?

I'm afraid of referencing via NuGet as I want the Mono runtime on the 
Linux installation to take preference over NuGet binaries on Linux. The 
Windows code path won't ever execute the code that's failing to compile, 
but I do not wish to use #define's as I need one binary that works 
cross-platform - in principle possible with Mono.

Reflection is not suitable to convert compile-time to run-time due to 
the performance cost.

My library needs to reference Mono.Posix under Linux to convert errno 
to/from system values and possibly other features in the future.


More information about the Mono-devel-list mailing list