Bug 31933 - Mono C# compiler incorrectly emits CS1705 Assembly X references assembly Y version=4.3 which is higher than imported assembly Y version=4.0 for some assemblies
Summary: Mono C# compiler incorrectly emits CS1705 Assembly X references assembly Y ve...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
: 13392 ()
Depends on:
Blocks:
 
Reported: 2015-07-14 13:20 UTC by emoriarty
Modified: 2015-07-24 09:52 UTC (History)
3 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:
RESOLVED FIXED

Description emoriarty 2015-07-14 13:20:23 UTC
Ran into an issue where mcs does not accept a pair of FSharp dll's that csc will happily use. I wasn't able to figure out how to create equivalent DLL's from scratch unfortunately. 

Steps to Reproduce.

1. git clone https://github.com/StackExchange/dapper-dot-net
2. cp dapper-dot-net/packages/FSharp.Core.4.0.0/lib/FSharp.Core.dll .
3. cp dapper-dot-net/packages/FSPowerPack.Core.Community.3.0.0.0/Lib/Net40/FSharp.PowerPack.dll .
4. Create a simple test file, for the purpose of getting the CS1705 error the contents don't really matter. For example 
   namespace A {
      class Foo {} 
   }

5. mcs /t:library /r:FSharp.Core.dll /r:FSharp.PowerPack.dll /noconfig A.cs 
error CS1705: Assembly `FSharp.PowerPack, Version=4.0.0.1, Culture=neutral, PublicKeyToken=null' references `FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version number than imported assembly `FSharp.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Compilation failed: 1 error(s), 0 warnings

6. csc accepts this (From VS2012 Developer Command prompt)
csc /t:library /r:FSharp.Core.dll /r:FSharp.PowerPack.dll /noconfig A.cs
Microsoft (R) Visual C# Compiler version 12.0.21005.1
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.



Edward Moriarty | Software Engineer
Coverity | The Leader in Development Testing
Comment 1 emoriarty 2015-07-14 13:26:55 UTC
This is probably the same issue as bug 13392
Comment 2 Marek Safar 2015-07-23 11:28:43 UTC
*** Bug 13392 has been marked as a duplicate of this bug. ***
Comment 3 Marek Safar 2015-07-24 09:52:41 UTC
Fixed in master