Bug 43305 - Standard Library dependency error on Xamarin Studio
Summary: Standard Library dependency error on Xamarin Studio
Status: VERIFIED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 4.4.2 (C7SR1)
Hardware: PC Mac OS
: --- normal
Target Milestone: 4.6.0 (C8)
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2016-08-12 13:57 UTC by NicolasDorier
Modified: 2016-08-23 09:28 UTC (History)
5 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description NicolasDorier 2016-08-12 13:57:07 UTC
On Xamarin Studio only (works fine on Visual Studio), a reference to a package depending on .NET Standard Library 1.6 create compile error.

Reproduction:

1. Create a new Xamarin IOS Project
2. Reference NBitcoin through nuget (https://www.nuget.org/packages/NBitcoin)
3. Use the following code somewhere: "NBitcoin.Protocol.Node.ConnectTo(Network.Main, "1.2.3.4");"
4. Compile.

Result:

Compile error: "CSC: error CS1705: Assembly `NBitcoin, Version=3.0.0.47, Culture=neutral, PublicKeyToken=null' depends on `System.Net.Sockets, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version number than referenced assembly `System.Net.Sockets, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'"

Expected:

Should compile fine.

Xamarin on Visual Studio does not have this issue, no issue at compile time and no issue at runtime.
Comment 1 Marek Safar 2016-08-12 17:36:38 UTC
Fixed in master and Mono 4.6
Comment 2 NicolasDorier 2016-08-13 01:34:38 UTC
So how can I solve my problem now ? waiting for 6.0.3 and update ?
Comment 3 Marek Safar 2016-08-15 08:31:02 UTC
You install Mono 4.6 preview (e.g. by switching to alpha channel in XS)
Comment 5 NicolasDorier 2016-08-23 08:58:35 UTC
I updated to 6.1.0.0 (5345) by switching to beta project, my project still do not compile. :(
Comment 6 NicolasDorier 2016-08-23 09:04:09 UTC
By creating a new project, it seems to compile fine. Old project do not.
Comment 7 NicolasDorier 2016-08-23 09:28:30 UTC
I needed to activate the linker on framework, else it asked my IOS SDK 10.0 shipped with XCode 8.0 which is not out...

There is still warning in my old project about assebmly reference incompatibilities.