不能从MVC2升级到MVC3

时间:2023-02-02 00:15:11

I've got myself an MVC2 web applicatin using .NET Framework 4 and am following these instructions to the T. However at step 10 when I save the updated ProjectTypeGuids I get a message saying "The project file projectname.csproj cannot be opened. The project type is not supported by this installation."

我有一个使用。net Framework 4的MVC2 web应用程序,并且我正在按照这些指令到t。但是在步骤10,当我保存更新的ProjectTypeGuids时,我得到一条消息说“项目文件projectname”。csproj不能被打开。此安装不支持项目类型。

I do have MVC3 installed and am running VS2010, so I don't know what could the going wrong. Anyone have any thoughts on the matter? Thanks!

我已经安装了MVC3并且正在运行VS2010,所以我不知道哪里出了问题。有人对这件事有什么想法吗?谢谢!

EDIT:

编辑:

For what it's worth. If I create a blank project from scratch, I have the ability to create a new MVC3 project. However, if I right click on my solution and click add->New Project... I can only add MVC2 projects. This leads me to think that the solution is configured somehow to only support MVC2, however I can't figure out how to change it.

是很值得重视的。如果我从零开始创建一个空白项目,我就有能力创建一个新的MVC3项目。但是,如果我右键单击我的解决方案并单击add->新项目……我只能添加MVC2项目。这使我认为,解决方案只是配置为只支持MVC2,但是我不知道如何更改它。

1 个解决方案

#1


3  

There is an extra package which is ASP.NET MVC 3 Tools Update, you must download and install it too.

还有一个额外的包是ASP。NET MVC 3工具更新,您必须下载并安装它。

Solution 1:

解决方案1:

Open the visual Studio Find In Files Dialog and Select your project folder, then search for old GUID and replace it with new one exactly. Backup the directory before doing this. Actually You must select the whole solution folder and search all the files not a specific extension.

打开visual Studio Find In Files对话框,选择您的项目文件夹,然后搜索旧的GUID并替换为新的。在执行此操作之前备份目录。实际上,您必须选择整个解决方案文件夹并搜索所有的文件,而不是特定的扩展。

Solution 2: You must take a careful look at your csproj and sln files and compare it with a working one on your system to find the difference. if you have file compare tools like winmerge, use it to compare files character by character

解决方案2:您必须仔细查看您的csproj和sln文件,并将其与您系统上的一个工作文件进行比较,以发现差异。如果您有文件比较工具,如winmerge,使用它来比较文件字符的字符。

#1


3  

There is an extra package which is ASP.NET MVC 3 Tools Update, you must download and install it too.

还有一个额外的包是ASP。NET MVC 3工具更新,您必须下载并安装它。

Solution 1:

解决方案1:

Open the visual Studio Find In Files Dialog and Select your project folder, then search for old GUID and replace it with new one exactly. Backup the directory before doing this. Actually You must select the whole solution folder and search all the files not a specific extension.

打开visual Studio Find In Files对话框,选择您的项目文件夹,然后搜索旧的GUID并替换为新的。在执行此操作之前备份目录。实际上,您必须选择整个解决方案文件夹并搜索所有的文件,而不是特定的扩展。

Solution 2: You must take a careful look at your csproj and sln files and compare it with a working one on your system to find the difference. if you have file compare tools like winmerge, use it to compare files character by character

解决方案2:您必须仔细查看您的csproj和sln文件,并将其与您系统上的一个工作文件进行比较,以发现差异。如果您有文件比较工具,如winmerge,使用它来比较文件字符的字符。