我试图在新的 dev 11 预览中打开并转换现有的 vs 2010 mvc 3 项目,但遇到了一个困难的问题。解决方案文件将成功转换,但是解决方案中的一个 mvc 3 Web 项目在解决方案资源管理器中显示为转换后已卸载。当我尝试从解决方案资源管理器重新加载项目时,系统提示我转换项目,并在upgradelog.xml 中收到以下错误:
项目文件“myproject.csproj”无法打开。缺少项目子类型。此安装不支持子类型:“{E53F8FEA-EAE0-44A6-8774-FFD645390401}”。
据我所知,这与 MVC 有关,但这并不能真正帮助我解决这个问题。任何建议或解决方法将不胜感激。
I've trying to open and convert an existing vs 2010 mvc 3 project in the new dev 11 preview and am running in to a difficult issue. The solution file will convert successfully, however the one mvc 3 web project in the solution shows in the solution explorer as unloaded post conversion. When i attempt to reload the project from solution explorer, i get prompted to convert the project and receive the following error in the upgradelog.xml
The project file'myproject.csproj' cannot be opened. There is a missing project subtype. Subtype: '{E53F8FEA-EAE0-44A6-8774-FFD645390401}' is unsupported by this installation.
From what i could track down, this has to do with MVC, but that doesn't really help me work around the issue. Any suggestions or workarounds would be appreciated.
发布评论
评论(2)
更新:实际上,MVC 3 for Visual Studio 11 Dev Preview 刚刚发布:http://www.microsoft.com/download/en/details.aspx?id=1491
我们尚未在 Visual Studio 11 中提供 MVC 3 支持。您可以解决此问题通过编辑您的 csproj 文件并删除项目类型 GUID {E53F8FEA-EAE0-44A6-8774-FFD645390401}。这将使您的项目像普通 WAP 一样加载。您将能够编辑代码,但 MVC 特定的操作(添加控制器等)将不可用。
Update: Actually, MVC 3 for Visual Studio 11 Dev Preview has just been published: http://www.microsoft.com/download/en/details.aspx?id=1491
We have not yet shipped MVC 3 support in Visual Studio 11. You can work around this by editing your csproj file and removing the project type GUID {E53F8FEA-EAE0-44A6-8774-FFD645390401}. This will cause your project to load like a normal WAP. You will be able to edit your code, however MVC-specific actions (Add Controller, etc) will not be available.
您可能想要尝试将 ASP.NET MVC 3 项目升级到 ASP.NET MVC 4 部分中的步骤Whitepapers/mvc4-release-notes" rel="nofollow">发行说明,即使该文档描述的是 VS2010 版本。
我设法转换了 VS2010/MVC3 项目,但每次打开解决方案时 VS11 都会显示警告,指出该项目需要带有 Razor syntx 1.0 的 ASP.NET 网页。 OTOH,该项目似乎运行没有任何问题(VS11 安装程序还安装了 ASP.NET 网页 2)。
You may want to try the steps from the Upgrading an ASP.NET MVC 3 Project to ASP.NET MVC 4 section of the release notes, even if the document describes the VS2010 version.
I managed to convert a VS2010/MVC3 project, but VS11 shows a warning every time I open the solution, stating that the project requires ASP.NET Web pages with Razor syntx 1.0. OTOH, the project seems to run without any problems (VS11 setup also installed ASP.NET Web pages 2).