Visual Studio 2010 错误:“未安装项目目标框架"打开 .NET 4.0 项目时 [英] Visual Studio 2010 error: "Project Target Framework Not Installed" when opening a .NET 4.0 project

查看:152
本文介绍了Visual Studio 2010 错误:“未安装项目目标框架"打开 .NET 4.0 项目时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一台开发机器遇到了一个相当令人不安的问题,我希望有人能给我建议.

I am experiencing a rather disconcerting issue with one of my development machines that I hope someone can advise me on.

我有一个大型 Visual Studio 2010 VB 解决方案,目标是 .NET Framework 4.0,它在许多 Visual Studio 2010 安装中都可以打开和工作——除了一个.打开解决方案时的错误"(更多消息)说:

I have a large Visual Studio 2010 VB solution, targeting the .NET Framework 4.0 which opens and works just find on numerous Visual Studio 2010 installations - except one. The 'error' (more a message) when opening the solution says:

项目目标框架未安装

VB 项目的目标是 '.NETFramework,Version=v4.0",这台机器上没有安装.你必须下载这个框架,以便打开和构建这个项目.为了继续,您必须在下面选择一个选项.

The VB project is targeting '.NETFramework,Version=v4.0", which is not installed on this machine. You must download this framework in order to open and build this project. In order to proceed, you must select an option below.

这是完整上下文的屏幕截图:

Here's a screenshot with the full context:

http://img507.imageshack.us/i/errorlc.jpg/

我试过了:

  1. 修复(未修复)、卸载并重新安装 Visual Studio(未修复)
  2. 修复(未修复)、卸载并重新安装 .NET Framework 4.0(未修复)

在第 2 步之后再次重试第 1 步(未修复).

Retrying step number 1 again after step number 2 (didn't fix).

当我使用 .NET Framework 删除工具从机器(包括注册表)中删除所有 .NET Framework 4.0 的痕迹,然后再次安装 .NET Framework 4.0 时,暂时起作用的是.但是错误又回来了.

What worked temporarily was when I used a .NET Framework removal tool in order to remove all traces of the .NET Framework 4.0 from the machine (including the registry) and then installing the .NET Framework 4.0 again. However the error has returned.

我不确定这是否是某些 .NET Framework 4.0 文件损坏的问题,是 Visual Studio 中的问题,还是只是 Visual Studio 找不到 .NET Framework 4.0.(我找到了几种可能的解释",但没有任何方法可以解决这个问题.

I'm not sure if this is a problem with some .NET Framework 4.0 file corruption, something within Visual Studio or simply that Visual Studio cannot find the .NET Framework 4.0. (I have found several possible 'explanations' but nothing that resolves this issue.

机器运行的是 Windows 7(64 位).

The machine is running Windows 7 (64 bit).

任何解决此问题的想法都会受到热烈欢迎!

Any ideas towards troubleshooting this issue would be warmly received!

推荐答案

我通过下载适当的开发者定位包为自己解决了这个问题.我错误地尝试下载运行时版本,它显然不包含您需要的 Visual Basic 插件.

I solved this issue for myself by downloading the appropriate Developer targeting pack. I made the mistake of trying to download the Runtime one, which apparently does not include the Visual Basic plug-in that you need.

我使用的是 .NET Framework 4.5.1,这是我下载的页面的链接:

I am using .NET Framework 4.5.1, and this is the link to the page I downloaded from:

http://msdn.microsoft.com/en-us/library/5a4x27ek%28v=vs.110%29.aspx

这篇关于Visual Studio 2010 错误:“未安装项目目标框架"打开 .NET 4.0 项目时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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