我正在使用Xamarin Studio 5.5.2和GTK#2.12在Windows上开发GTK#应用程序。
每次编译我的应用程序时,都会收到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 :(得分:0)
我也遇到了这个问题。事实证明 gtk-sharp.dll 以及您在GTK#周围使用的其他程序集都是通过引用 Mono.Cairo 2.0.0.0 编译的,所以当你在项目中引用它们,编译器也会引用这些引用。
这是奇怪的,因为GTK#for Windows现在暂时没有发布 Mono.Cairo 2.0.0.0 。希望Xamarin能够在新版本中解决这个问题。我目前正在使用 GTK#2.12.38 。