visual-studio 此安装不支持项目类型
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2745988/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The project type is not supported by this installation
提问by Nick
Whenever I try to open a project (csproj)that's downloaded from the internet, most of the times, I get the
每当我尝试打开(csproj)从 Internet 下载的项目时,大多数情况下,我都会得到
"The project type is not supported by this installation"
“此安装不支持该项目类型”
It appears that my Visual Studio installation is not corrupted (I can pretty much do everything with it other than open these csproj files)
看来我的 Visual Studio 安装没有损坏(除了打开这些 csproj 文件,我几乎可以用它做任何事情)
What may be causing this?
这可能是什么原因造成的?
采纳答案by SergGr
editplease see the answer further down, which is about 18 months newer, and actually solves the problem. This historically once-accurate answer is no longer as accurate. Leaving intact after the break for this reason. - thanks - jcolebrand
编辑请进一步查看答案,它更新了大约 18 个月,实际上解决了问题。这个历史上曾经准确的答案不再准确。由于这个原因,休息后保持原样。-谢谢 - jcolebrand
What edition of VS do you use? VS2008 Express, Standard, Pro or Team System? VS2010 Professional, Premium or Ultimate? I would expect that the project you downloaded was created using a higher edition of Visual Studio and uses some of those advanced features. Thus you can not open it.
你用的是什么版本的VS?VS2008 Express、Standard、Pro 还是 Team System?VS2010 专业版、高级版还是旗舰版?我希望您下载的项目是使用更高版本的 Visual Studio 创建的,并使用了其中一些高级功能。因此您无法打开它。
EDIT: It is also possible that you lack some advanced frameworks like newer versions of Windows Mobile SDK, but if I recall correctly,the error message in such case is different.
编辑:您也可能缺少一些高级框架,例如较新版本的 Windows Mobile SDK,但如果我没记错的话,这种情况下的错误消息是不同的。
回答by MindStalker
Open up the .csproj file for your solution in wordpad or some text editor. Look for the ProjectTypeGuids. They indicate the required supported types for your solutions. Search the internet these GUIDs to find out what they require. For example E53F8FEA-EAE0-44A6-8774-FFD645390401 means it requires "MVC 3.0"
在写字板或某些文本编辑器中打开解决方案的 .csproj 文件。查找 ProjectTypeGuids。它们指示您的解决方案所需的支持类型。在 Internet 上搜索这些 GUID 以了解它们的要求。例如 E53F8FEA-EAE0-44A6-8774-FFD645390401 意味着它需要“MVC 3.0”
回答by juFo
For Visual Studio 2010 (prolly also for other versions):
对于 Visual Studio 2010(也适用于其他版本):
If you are opening an ASP.NET MVC project make sure that the correct MVC version is installed on your PC. If you try to open an ASP.NET MVC 3project, first close all your visual studio instances and install MVC3: http://www.microsoft.com/en-us/download/details.aspx?id=1491
如果您要打开 ASP.NET MVC 项目,请确保您的 PC 上安装了正确的 MVC 版本。如果您尝试打开 ASP.NET MVC 3项目,请先关闭所有 Visual Studio 实例并安装 MVC3:http: //www.microsoft.com/en-us/download/details.aspx?id=1491
For other ASP.NET MVC versions download them from www.asp.net/mvc or via Web Platform Installer 4.0.
对于其他 ASP.NET MVC 版本,请从 www.asp.net/mvc 或通过 Web Platform Installer 4.0 下载它们。
回答by Daniel Byrne
Instead of searching fr the GUIDs, you can simply delete the GUIds tags. Then try opening the project again. The second time opening you should get a more reasonable error message.
您可以简单地删除 GUID 标签,而不是搜索 GUID。然后再次尝试打开该项目。第二次打开你应该得到一个更合理的错误信息。
For instance my issue was that I did not install SharePoint Developer Tools when I installed Visual Studio 2010 on my development Virtual Machine. So when I tried opennign the project after deleting the GUIDs, VS2010 told me the path it was looking for did not exist.
例如,我的问题是我在开发虚拟机上安装 Visual Studio 2010 时没有安装 SharePoint 开发人员工具。因此,当我在删除 GUID 后尝试打开项目时,VS2010 告诉我它正在寻找的路径不存在。
Therefore VS2010 was looking for a SharePoint library that was not installed. I simply had to run the install again, and then add that feature.
因此,VS2010 正在寻找未安装的 SharePoint 库。我只需要再次运行安装,然后添加该功能。
回答by Maxim Saplin
Had the same issue with "The project type is not supported by this installation" for web projects in VS 2010 Premium.
对于 VS 2010 Premium 中的 Web 项目,“此安装不支持项目类型”存在相同的问题。
devenv /ResetSkipPkgs
devenv /ResetSkipPkgs
and GUIDs magic did not help.
和 GUID 魔法没有帮助。
Same projects were working fine on a neighbor box with VS 2010 Premium.
同样的项目在 VS 2010 Premium 的邻居盒子上运行良好。
As it turned out the only difference was that my VS installation was missing the following installed products (can be found in VS About dialog):
事实证明,唯一的区别是我的 VS 安装缺少以下已安装的产品(可以在 VS 关于对话框中找到):
- Microsoft Office Developer Tools
- Microsoft Visual Studio 2010 SharePoint Developer Tools
- Microsoft Office 开发人员工具
- Microsoft Visual Studio 2010 SharePoint 开发工具
Add/Remove programs -> VS 2010 -> Customize -> Check the above products - and the problem was solved.
添加/删除程序 -> VS 2010 -> 自定义 -> 检查以上产品 - 问题解决。
回答by juanagui
I had the same problem opening the NuGet solution with VS 2010 Ultimate, but the following command fixed it:
我在使用 VS 2010 Ultimate 打开 NuGet 解决方案时遇到了同样的问题,但以下命令修复了它:
devenv /ResetSkipPkgs
回答by Patrick
If you are using VS 2010 and it is a ASP.NET project make sure you have the Visual Developer installed from the VS 2010 CD. This is not the free one, but part of what is required to work on ASP.NET projects in Visual Studio.
如果您使用的是 VS 2010 并且它是一个 ASP.NET 项目,请确保您从 VS 2010 CD 安装了 Visual Developer。这不是免费的,而是在 Visual Studio 中处理 ASP.NET 项目所需的一部分。
回答by BALKANGraph
You could also try to run the following command:
您也可以尝试运行以下命令:
devenv /ResetSkipPkgs
回答by Denis
You might need to install the "Microsoft Web Platform Installer" from http://www.microsoft.com/web/downloads/platform.aspx
您可能需要从http://www.microsoft.com/web/downloads/platform.aspx安装“Microsoft Web Platform Installer”
回答by Sergey
I had similar issue with c#, first I found that each project may have a few different types. i.e. in .csproject file locate ProjectTypeGuids, it should be a few guids, i.e.
我在 c# 中遇到了类似的问题,首先我发现每个项目可能有几种不同的类型。即在.csproject文件中找到ProjectTypeGuids,应该是几个guids,即
<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
they will point on component you are missing. In my case it was ASP.NET MVC 2. Some guys get it worked by installing MVC 2 destribution.
他们将指向您缺少的组件。就我而言,它是 ASP.NET MVC 2。有些人通过安装 MVC 2 分发版使其工作。
My case was worse, because installation didn't work, but it turned out that it was because I had Express 2008 and 2010. I fixed it by uninstalling both 2008 & 2010 and installing only 2010 versions. For c# you need both Visual C# Express and Visual Web Developer express
我的情况更糟,因为安装不起作用,但结果证明是因为我有 Express 2008 和 2010。我通过卸载 2008 和 2010 并仅安装 2010 版本来修复它。对于 c#,您需要 Visual C# Express 和 Visual Web Developer express

