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)

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


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.