Visual Studio 2010中:无法解析的mscorlib为目标框架“.NETFramework,版本= V4.0” [英] Visual Studio 2010: Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'

查看:3070
本文介绍了Visual Studio 2010中:无法解析的mscorlib为目标框架“.NETFramework,版本= V4.0”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在迁移我们所有的解决方案2005至10年(这是正确的,我们跳过2008!)。我们也正在改变着我们的文件结构做一些更有意义(一些共同项目将被嵌套在具体项目中等等等等)。

We are currently migrating all our solutions from 2005 to 2010 (that's right, we're skipping 2008!). We are also changing our file structure to make some more sense (some common projects would be nested within specific projects etc etc).

这一切都意味着引用需要改变!除此之外,我们也把它们都设.NET 4.0。要做到这一点,我们做了一个临时的上帝在同一个解决方案的所有117个项目的解决方案。

This all means references need to be changed! Apart from that we are also setting them all to .NET 4.0. To accomplish this we've made a temp "GOD" solution with all 117 projects in the same solution.

我一个同事,直到约2这样做小时前一切都在按计划进行。但是,我们遇到了一个问题与117项目之一。本项目拒绝显示这是在项目属性引用,资源,服务和设置标签页

I am doing this with one co-worker and until about 2 hours ago everything was going according to plan. However we ran into a problem with one of the 117 projects. This project refuses to "display" it's references, resources, services, and settings tabs within the Project Properties.

我碰到下面的确切消息:

I get the following exact message:

无法解析目标
框架
'.NETFramework,版本= V4.0'mscorlib程序。这可以美元,如果目标框架是不是$ B安装$ B或者框架绰号
的格式不正确b $ B发生。

Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'. This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted.

现在这很烦人,但它会变得更糟。我的同事,正从颠覆相同的解决方案时,可以清楚地看到和更改引用和的事情。作为事实上,目前该项目实际上建立他的机器上。他犯了变化,但我不能建立这个具体项目,或见引用。

Now this is annoying but it gets worse. My co-worker, when getting the same solution from subversion, CAN actually see and change the references and things. As a matter of fact, currently the project actually BUILDS on his machine. He committed the changes but I can't build this specific project, or see the references.

这使我对一个简单的结论,有些事情是我的客户端上的不同这是造成麻烦!网上说我见过的建议如下:

Which leads me to the simple conclusion, something has to be different on my client which is causing trouble! Suggestions online that I've seen are the following:


  • 多个.NET4.0版本的安装(这不是我的客户端的情况下)

  • .NET v3.5版本未安装; V4.0正努力打造3.5版(3.5安装我的客户端上)

  • 的系统登录键:OnlyUseLatestCLR设置,并拧东西了! (扫描我的注册表,此键是不存在的任何地方!)

请参阅:的 http://connect.microsoft.com/VisualStudio/feedback/details/542789/

我可以做我没有尝试过的唯一的事情却又是修复.NET 4.0怎么过我高度怀疑这是问题,因为我们有大约100,我可以编辑和构建就好了其他项目。 C#和VB.NET。

The only thing I haven't tried yet which I could do is repair .NET 4.0 how ever I highly doubt this is the issue since we have about 100 other projects which I can edit and build just fine. Both C# and VB.NET.

推荐答案

Microsoft Visual Basic的应用程序扩展5.3(VBIDE)是魔鬼的名字! !

Microsoft Visual Basic for Applications Extensibility 5.3 (VBIDE) is the name of the devil!!!

显然,这是一个参考它我的同事已经弄好了,但我没有因为这一点参考,都死了。因为如果你检查的具体项目(这是一个VB.NET工程)显示所有文件你的甜蜜引用文件夹,这通常是不是有VB.Net项目是我们似乎发现了这个。当标签令我们失望,该文件夹向我们展示一个警告一个参考。显然,这是后话了编译器或VS2010不能告诉我,但正是被它搞乱了我们。​​

Apparently this is a reference which my co-worker had somehow, but i didn't and because of this reference, EVERYTHING died. We discovered this because if you check "Show all files" on the specific project (which is a VB.NET project) you get the sweet References folder, which is normally not there for VB.Net project it's seems. Where the Tab failed us, the folder showed us one reference with a warning. Apparently this is something the compiler or VS2010 couldn't tell me but was exactly what was messing it up for us.

所以,在工作时,如果你得到这个错误项目显示所有文件,这样你能看到引用文件夹,并找出其中提到可能会造成您的问题!

So, if you get this error when working on a project, "Show all files" so you get to see the References folder, and find out which reference could be causing your problems!

我很高兴它发现这虽然,经过再3小时! ><

I'm glad it found this though, after more then 3 hours!! >.<

这篇关于Visual Studio 2010中:无法解析的mscorlib为目标框架“.NETFramework,版本= V4.0”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆