升级到.NET 4.5的原因装配失败? [英] Upgrade to .Net 4.5 causes assembly to fail?
问题描述
我已经得到了面向.NET 4.0的项目,并且引用的组件之一是净4.5。
I've got a project that targets .Net 4.0, and one of the referenced assemblies is .Net 4.5.
直到我安装了.NET 4.5这是工作的罚款,但安装后我就得到有针对性的.NET版本沿着这些路线五个警告:
Until I installed .Net 4.5 this was working fine, however after the install I get five warnings regarding the targeted .Net version along these lines:
*的的主要参考xxxx.Library,版本= 1.0.0.1,文化=中性的ProcessorArchitecture = MSIL无法解析 因为它是建立在对.NETFramework,版本= V4.5 框架。这是一个更高的版本比当前目标 框架.NETFramework,版本= V4.0的
*The primary reference "xxxx.Library, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0"
和这样的:
主要参考Microsoft.TeamFoundation.Build.Workflow,版本= 10.0.0.0,文化=中性公钥= b03f5f7f11d50a3a, 的ProcessorArchitecture = MSIL无法得到解决,因为它有一个 在框架组装间接依赖System.IO.Com pression, 版本= 4.0.0.0,文化=中性公钥= b77a5c561934e089 这可能不是在当前的目标框架来解决。 .NETFramework,版本= V4.0。要解决此问题,请删除 参考Microsoft.TeamFoundation.Build.Workflow, 版本= 10.0.0.0,文化=中性公钥= b03f5f7f11d50a3a, 的ProcessorArchitecture = MSIL或重新定位你的应用程序到 其中包含框架版System.IO.Com pression, 版本= 4.0.0.0,文化=中立, 公钥= b77a5c561934e089测试的
The primary reference "Microsoft.TeamFoundation.Build.Workflow, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "Microsoft.TeamFoundation.Build.Workflow, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Tests
为什么Visual Studio的恨我吗?如果可以在升级到4.5之前,编译,有针对性的框架并没有改变,为什么我被塞进它仍然适用于同事关于VS2010与.net 4?
Why does Visual Studio hate me? If it could compile before the update to 4.5, the targeted framework has not changed and it still works for a colleague on VS2010 with .Net 4 why am I being stuffed?
推荐答案
该错误消息说明了问题 - 一个.NET 4的应用程序不能引用一个.NET 4.5的DLL。改变你的应用程序到.NET 4.5为好,或更改DLL回.NET 4。
The error message explains the problem - a .NET 4 app can't reference a .NET 4.5 dll. Change your app to .NET 4.5 as well, or change the dll back to .NET 4.
这篇关于升级到.NET 4.5的原因装配失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!