wpf 具有比引用的程序集 XXX 更高版本的程序集 XXX
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20157155/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Assembly XXX which has a higher version than referenced assembly XXX
提问by user2330678
I am trying to build a project using latest version of Prism and Unity but, it gives below error. How to fix below error?
我正在尝试使用最新版本的 Prism 和 Unity 构建一个项目,但是出现以下错误。如何修复以下错误?
Assembly 'Microsoft.Practices.Prism.UnityExtensions, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.Practices.Unity, Version=3.0.1208.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.Practices.Unity, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Prism4.1\Bin\Desktop\Microsoft.Practices.Prism.UnityExtensions.dll HelloWorld.Desktop
程序集“Microsoft.Practices.Prism.UnityExtensions,版本=4.5.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”使用“Microsoft.Practices.Unity,Version=3.0.1208.0,Culture=neutral,PublicKeyToken=31bf364e35ad”版本比引用的程序集 'Microsoft.Practices.Unity, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Prism4.1\Bin\Desktop\Microsoft.Practices.Prism.UnityExtensions.dll HelloWorld.Desktop
回答by Damian Cherubini
This is a problem between Unity and Prism.
这是Unity和Prism之间的问题。
Apparently, when the version of Prism for .NET 4.5 was built they were using a version of Unity signed with a version number of 3.0.1208.0. However, in the latest releases of Unity it seems that they reset that number back to 3.0.0.0, which is causing this error as the latest version of Unity has a lower version number that the previous one.
显然,当构建用于 .NET 4.5 的 Prism 版本时,他们使用了一个版本号为3.0.1208.0的 Unity 版本。但是,在最新版本的 Unity 中,他们似乎将该数字重新设置为3.0.0.0,这会导致此错误,因为最新版本的 Unity 版本号低于前一个版本。
There is a thread in the CodePlex forums for Prism mentioning this with a couple of workarounds for it:
在 CodePlex 论坛中有一个关于 Prism 的帖子提到了这一点,并提供了一些解决方法:

