2

I'm developing a GTK# application on Windows, using Xamarin Studio 5.5.2 and GTK# 2.12 .

Every time I compile my app I get the MSB3276 warning. Looking for a solution I've found this StackOverflow thread:

warning MSB3276 - Found conflicts between different versions of the same dependent assembly

Following the indications of the other thread I've used AsmSpy to check where's the problem, and I've found something very strange. My application is referring to two different versions of the Mono.Cairo library:

Reference: mscorlib
        4.0.0.0 by ColorSharp
        4.0.0.0 by MathNet.Numerics
        4.0.0.0 by Newtonsoft.Json
        4.0.0.0 by LightCreator
Reference: MathNet.Numerics
        3.2.3.0 by ColorSharp
Reference: System.Numerics
        4.0.0.0 by MathNet.Numerics
        4.0.0.0 by Newtonsoft.Json
Reference: System
        4.0.0.0 by MathNet.Numerics
        4.0.0.0 by Newtonsoft.Json
        4.0.0.0 by LightCreator
Reference: System.Core
        4.0.0.0 by MathNet.Numerics
        4.0.0.0 by Newtonsoft.Json
Reference: System.Data
        4.0.0.0 by Newtonsoft.Json
Reference: System.Xml
        4.0.0.0 by Newtonsoft.Json
Reference: System.Xml.Linq
        4.0.0.0 by Newtonsoft.Json
Reference: System.Runtime.Serialization
        4.0.0.0 by Newtonsoft.Json
Reference: gtk-sharp
        2.12.0.0 by LightCreator
Reference: ColorSharp
        0.2.1.20880 by LightCreator
Reference: gdk-sharp
        2.12.0.0 by LightCreator
Reference: Mono.Cairo
        4.0.0.0 by LightCreator   // !!!!
        2.0.0.0 by LightCreator   // !!!!
Reference: Mono.Posix
        2.0.0.0 by LightCreator
Reference: glib-sharp
        2.12.0.0 by LightCreator

I've been searching for a solution, looking into solution and project properties, references... but I couldn't find anything.

Anyone knows how to get rid of this strange problem?

Thank you in advance.

Community
  • 1
  • 1
castarco
  • 1,368
  • 2
  • 17
  • 33
  • Use the same tool on your dependencies, one of them is targeting 2.0 – Hans Passant Oct 20 '14 at 11:54
  • But in this listing you can find the other dependencies already. There is only one direct dependency on Mono.Cairo 2.0.0.0 , and its from my program (LightCreator) – castarco Oct 20 '14 at 12:10

1 Answers1

0

I got to this problem too. It turns out that gtk-sharp.dll and the rest of the assemblies that you use around GTK# are compiled with a reference to Mono.Cairo 2.0.0.0 so when you reference them in your project the compiler pulls these references too.

This is strange the least as GTK# for windows is not shipping Mono.Cairo 2.0.0.0 for some time now. Hopefully Xamarin will fix that problem in new versions. I am using GTK# 2.12.38 at the moment.

flipm0de
  • 183
  • 1
  • 10