Visual Studio 2010中的错误:"项目目标框架未安装"打开.NET 4.0项目时,项目、框架、错误、目标

2023-09-03 03:12:02 作者:野性入骨

我遇到与我的开发机器,我希望有人能告诉我在一个相当令人不安的问题。

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框架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,版本= 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:

https://m.xsw88.com/allimgs/daicuo/20230903/853.png/

我曾尝试:

在修复(未修复),卸载并重新安装Visual Studio中(没有解决) 在修复(未修复),卸载并重新安装.NET Framework 4.0中(没有解决)

再次步数2(未解决)。

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

什么工作暂时是当我为了使用.NET框架拆卸工具从计算机删除.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

 
精彩推荐
图片推荐