简体   繁体   English

将VS2008 / .NET FX 2.0项目升级到VS2010后出现奇怪的错误

[英]Getting a weird error after upgrading a VS2008/.NET FX 2.0 project to VS2010

After the upgrade, when build, a warning pops up saying: 升级后,在构建时,会弹出警告说:

The primary reference "Elegant.Ui.Ribbon, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3a2b400713aae6e0, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 无法解析主要参考“ Elegant.Ui.Ribbon,版本= 3.5.0.0,文化=中性,PublicKeyToken = 3a2b400713aae6e0,processorArchitecture = MSIL”,因为它间接依赖于.NET Framework程序集“ mscorlib,版本= 4.0” .0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089”,其版本“ 4.0.0.0”比当前目标框架中的版本“ 2.0.0.0”更高。 PDFFlowline.VS2010 PDFFlowline.VS2010

How so? 怎么会这样? And how to fix it. 以及如何解决。 This project compiles fine on VS2008. 该项目在VS2008上编译良好。 I'm running Windows 7 and VS2010 and both of them have the latest updates installed. 我正在运行Windows 7和VS2010,并且它们都安装了最新更新。

I cannot get it to work on VS2010, instead I tried SharpDevelop which can open and build projects of older version, in this case VS2008. 我无法在VS2010上使用它,而是尝试了SharpDevelop,它可以打开和构建旧版本的项目,在本例中为VS2008。 So my problem solved, sort of. 所以我的问题解决了。 BTW, to get it to work, you need to set the target framework to 2.0 and C# compiler to 3.0 if you are planning to use lambda, LINQ with LINQBridge and Extension Methods which is an essential part of my C# coding. 顺便说一句,要使其正常工作,如果您打算将lambda,LINQ与LINQBridge和扩展方法一起使用,则需要将目标框架设置为2.0,并将C#编译器设置为3.0,这是我的C#编码的重要组成部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM