ASP.NET MVC 项目“不受此安装支持”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1531120/
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
ASP.NET MVC project "not supported by this installation"
提问by roundcrisis
I can create new MVC projects and they work and run however trying to open an existing project is not working at all
我可以创建新的 MVC 项目,它们可以工作并运行,但是尝试打开现有项目根本不起作用
I tried the following changing the project type to:
我尝试了以下将项目类型更改为:
<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
(this worked on migrating a project from Asp.Net MVC preview 1 to preview 2 BTW)
(这适用于将一个项目从 Asp.Net MVC 预览版 1 迁移到预览版 2 BTW)
Changed the Reference to:
将参考更改为:
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
I tool this from a new project I created so i know that should be ok ( i even hardcoded the path to the same result)
我从我创建的一个新项目中使用了这个工具,所以我知道应该没问题(我什至将路径硬编码为相同的结果)
Still i get the dreaded
我仍然感到害怕
The project file '.....csproj' cannot be opened. The project type is not supported by this installation.
无法打开项目文件“.....csproj”。此安装不支持该项目类型。
I also tried devenv /setupand installing the sp1 for visual studio
我还尝试devenv /setup安装了 Visual Studio 的 sp1
the project i m trying to open is thisone (a DevExpress sample of a grid working on ASP.NET MVC)
我试图打开的项目是这个(一个在 ASP.NET MVC 上工作的网格的 DevExpress 示例)
采纳答案by roundcrisis
ok the problem was too many changes, I unzipped the solution again and just changed
the first parameter in the ProjectTypeGuidsto {F85E285D-A4E0-4152-9332-AB1D724D3325}so it looks like
好的,问题是变化太多,我再次解压缩解决方案,只是将ProjectTypeGuidsto 中的第一个参数更改为{F85E285D-A4E0-4152-9332-AB1D724D3325}看起来像
<ProjectTypeGuids>{**F85E285D-A4E0-4152-9332-AB1D724D3325**};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
and I can see the project hurray!
我可以看到项目欢呼!
回答by Mike Kelly
Just had a similar problem when taking an older MVC / Azure WebRole project into VS 2012 with MVC4. The trick was to edit the .CSPROJ like this:
使用 MVC4 将旧的 MVC/Azure WebRole 项目引入 VS 2012 时遇到了类似的问题。诀窍是像这样编辑 .CSPROJ:
10c11
< <ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11
da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
---
> <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11
da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
i.e. change the first one from {F8... to {E3E3... (which is apparently MVC4). This has to be done outside of Visual Studio, in a text editor, and then open the solution and "Reload" the project that gave an error - this will trigger VS to migrate it to VS 2012.
即将第一个从 {F8... 更改为 {E3E3...(显然是 MVC4)。这必须在 Visual Studio 之外的文本编辑器中完成,然后打开解决方案并“重新加载”出现错误的项目 - 这将触发 VS 将其迁移到 VS 2012。
回答by Pencho Ilchev
You need to install ASP.NET MVC 2.
您需要安装ASP.NET MVC 2。
回答by adib.mosharrof
There is a really easy way to solve this.
有一个非常简单的方法可以解决这个问题。
Probably some of the dependencies are missing, and it is really hard to find out which one.
可能缺少某些依赖项,并且很难找出是哪个依赖项。
Go to
去
Download ASP.NET and WebTools for your version of Visual Studio
为您的 Visual Studio 版本下载 ASP.NET 和 WebTools
A web platform installer will come up, which will install all the required tools
将出现一个 Web 平台安装程序,它将安装所有必需的工具
This solved my problem
这解决了我的问题
There is no need to go through the ProjectTypeGuids
无需通过 ProjectTypeGuids

