将我的VS2010定位到.NET4 Framework的问题

时间:2011-12-13 05:14:24

标签: c# visual-studio visual-studio-2010

我一直在VS2010中收到有关框架的以下消息。此外,我不能再将.net 4添加为目标框架。我已经尝试安装/修复.net 4框架。它一直告诉我一切都好,但后来我仍然收到消息,无法定位.net 4或从项目属性的下拉列表中添加它。我不知道该怎么做。任何建议将不胜感激。

Warning 8   The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

2 个答案:

答案 0 :(得分:1)

您是否尝试过下载和安装?:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8279

它对其他人有效。

据我所知,这与.NET框架不同,后者仅用于运行应用程序。

答案 1 :(得分:0)

C:\ Program Files [(x86)] \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0

这是VS寻找引用程序集的文件夹。它是否在您的机器上包含正确的东西?如果没有,你需要修复VS。

此文件夹不是.NET 4安装的一部分,因此修复.NET 4对您没有多大帮助。

相关问题