Bug 60891 - NuGet Mono.Posix.targets incorrectly uses Mac DLL on all none-Windows platforms
Summary: NuGet Mono.Posix.targets incorrectly uses Mac DLL on all none-Windows platforms
Alias: None
Product: Class Libraries
Classification: Mono
Component: Mono.POSIX ()
Version: 5.4 (2017-06)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bill Holmes
Depends on:
Reported: 2017-11-28 14:43 UTC by mkvonarx
Modified: 2018-04-02 08:42 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description mkvonarx 2017-11-28 14:43:50 UTC
NuGet Mono.Posix.targets has an incorrect comparison that results in the compiler trying to use the Mac DLL on all none-Windows platforms. Result: does not compile on Mono on Linux.

current value in Mono.Posix.targets (NuGet at https://www.nuget.org/packages/Mono.Posix/):
      <HintPath Condition="'$(OS)' != 'Windows_NT'">$(MSBuildThisFileDirectory)mac\Mono.Posix.dll</HintPath>

should probably be (at least it works like this when I test it under Windows and under Linux; I cannot test under OSX):
      <HintPath Condition="'$(OS)' == 'OSX'">$(MSBuildThisFileDirectory)mac\Mono.Posix.dll</HintPath>

I couldn't find the file 'Mono.Posix.targets' on GitHub. Would have created a pull request otherwise.
Comment 1 Marek Safar 2018-03-13 16:22:15 UTC
Please use https://www.nuget.org/packages/Mono.Posix.NETStandard/ instead