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

Greg Young gregoryyoung1 at gmail.com
Mon Mar 28 11:06:38 UTC 2016


<Reference Include="Mono.Posix" Condition=" '$(OS)' != 'Windows_NT' " />

On Mon, Mar 28, 2016 at 2:05 PM, Jason Curl <jcurlnews at arcor.de> wrote:
> 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.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



-- 
Studying for the Turing test


More information about the Mono-devel-list mailing list