Is it possible to create ASP.NET MVC3 project with using Visual Studio 2013? By default, I can create only ASP.NET MVC4 and ASP.NET MVC5.
2 Answers
Yes it is possible,
- Create the project with the new mvc
- Open references from the solution explorer and then delete system.web.mvc
- From tools select Nuget package manager console
- Download system.web.mvc 3 using this:
Install-Package Microsoft.AspNet.Mvc -Version 3.0.20105.1
3 Comments
Jaxidian
Simply taking a new Azure Cloud Service project in VS2013 with the web role as an MVC application and running that NuGet command results in a badly broken project (won't compile because of
AllowAnonymousAttribute). Even after fixing that, you then have runtime errors with the System.Web.WebPages.Razor assembly. It seems this is a rabbit hole that needs quite a bit of more work to get working.Jaxidian
I will add, though, that if somebody has a legacy MVC 3 app from older versions of VS that they bring into VS2013, this approach seems to have some tremendous value. Upvoting this for that reason even though that isn't quite the target of the original question.
Martin_W
This still worked for old projects loaded in VS 2019
You cannot create a ASP.NET MVC3 project with using Visual Studio 2013. You must upgrade See this SO question for more detail.