2014-10-20 35 views
2

我正在开发Windows上的GTK#应用程序,使用Xamarin Studio的5.5.2和GTK#2.12。警告MSB3276 - 斯特兰奇版本的Mono.Cairo行为

每当我编译我的应用程序,我得到MSB3276警告。寻找我发现这个StackOverflow的线程解决方案:

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

下面我用AsmSpy以检查问题出在其他线程的迹象,我发现很奇怪的东西。我的应用程序指的是两个不同的版本库的Mono.Cairo的:

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 

我一直在寻找一个解决方案,寻找到解决方案和项目性质,引用......但我无法找到任何东西。

任何人都知道如何摆脱这个奇怪的问题?

预先感谢您。

+0

对你的依赖使用相同的工具,其中之一的目标是2.0 – 2014-10-20 11:54:09

+0

但在此列出你已经可以找到其他依赖。 Mono.Cairo 2.0.0.0只有一个直接的依赖关系,它来自我的程序(LightCreator) – castarco 2014-10-20 12:10:58

回答

0

我也遇到了这个问题。事实证明,GTK的sharp.dll和你周围的GTK#使用组件的其余部分与参考编译2.0.0.0的Mono.Cairo所以当你引用它们在项目中的编译器拉这些引用太。

这太奇怪了,至少GTK#for windows没有出货Mono.Cairo 2.0.0.0有一段时间了。希望Xamarin能够在新版本中解决这个问题。我现在使用的是GTK#2.12.38