We have just released the final version of ASP.NET MVC 3. Read the official MVC 3 release information or download MVC 3.
To help you upgrade your MVC 2 projects to MVC 3 we have released an upgrade tool. You can download it here: http://aspnet.codeplex.com/releases/view/59008. (This is an update of the tool that Eilon Lipton previously previewed on his blog and now we are giving it a more permanent home on our CodePlex site).
April 11 Update: We made a small update to the tool that allows you to skip the backup step. You might want to consider skipping the backup step if you use source control or if your solution is very big.
January 14 Update: We have updated the file on codeplex to fix an issue with converting solutions that had Web Sites or other solution items. If you are having problems please make sure you download the tool again from the codeplex site.
The upgrade tool only supports Visual Studio 2010 projects targeting .NET 4. Upgrading both MVC 2 and MVC 3 Beta (or RC) projects is supported.
The tool does not support Visual Studio 2008 solutions, MVC 1 projects, or projects targeting .NET 3.5. Those projects will first have to be upgraded using Visual Studio 2010 and/or retargeted for .NET 4:
The usage of the tool is quite simple:
During the conversion process the tool will:
This is an unsupported utility and there is a possibility that it might not work correctly for your solution. Specifically, the tool has the following limitations:
However, if you run into problems let me know and I will see if we can get them addressed.
I have an NullReferenceExpection reported after the solution is backed-up:
ERROR: There was an error converting the solution file
Object reference not set to an instance of an object.
No changes are made to the solution.
It's VS2010, .NET 4, MVC2.
After opening a solution in the tool I can see the tree of projects in the tree view with valid upgrade steps displayed for each project.
Jakub, could you send me the generated log as well as the solution, project, or web.config file for which the exception gets thrown? Email is marcind at microsoft.
It probably doesn't work with web site projects, which isn't surprising, but should be noted..
I got the same error as Jakub, the project was also unable to load in VS afterwards.
Marcin, I've sent the files in the morning. Thank you!
I have the same problem:
The solution is being backed up to E:\Applications\onyx\src\__MVC_BACKUP
The solution E:\Applications\onyx\src\onyx.sln is being converted
I had the same issue. To fix it I created a blank solution, then added my web project and other libraries that reference system.web.mvc, and converted that. It worked just fine then.
Thank you everyone for the reports. I'll have an updated version of the tool posted to the codeplex site soon. In the meantime, Gabe's workaround (creating a new solution and adding your existing projects) should solve the problem.
We've posted an updated version of the tool on the codeplex site (same URL) that should fix the issues reported in the earlier comments.
Your new solution is working great.
I have successfully upgraded N2 CMS MVC2 test project to MVC3
This worked great! Was fast and simple. Thank you very much
Hi, the tool ran fine but when I open the solution and try to add a new view, the Dialog Box does not show my classes from Models and VoewModels Folders. Any hint? I did rebuild the solution again, but the issue persist
I've used your tool and it works like charm! Thanks a lot, it saves time :)
Any ideas on how to get around the really long path names issue?
Shawn, for now you would have to move your project closer to the root directory to achieve shorter file names. We will look at addressing this in the future. Sorry for the inconvenience.