Reputation: 39413
I've read the list to upgrade a site to MVC4 here http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806 and after that start looking for a package that can do that (You know, I'm lazy)
I found that there are some MS packages with the DLLs inside, but none that only change the web.config, the references, etc.
That let me wonder if NuGet is able to do all the transformations or not.
Do you know if it's possible to upgrade to MVC4 using a NuGet Package?
Upvotes: 2
Views: 1028
Reputation: 39413
Just tried to make the package myself, and the problem is that you can't delete/replace entries on web.config
or in the project file, you can only add.
Off to make an exe...
Edit Made this command line exe that does the transformations replacements in web.config
, project.csproj
and views\web.config
https://gist.github.com/3560580
Enjoy!
Upvotes: 2
Reputation: 18002
Unfortunately, no, some manual steps are involved:
Upgrading an ASP.NET MVC 3 Project to ASP.NET MVC 4
To upgrade and existing ASP.NET MVC 3 Project to ASP.NET MVC 4, one need to take care of following points:
3.0.0.0
to 4.0.0.0
for System.Web.Mvc
and 1.0.0.0
to 2.0.0.0
for System.Web.WebPages
, System.Web.Helpers
, System.Web.WebPages.Razor
.appSettings
value for key "webPages:Version"
to "2.0.0.0"
. Apart from that also add new appSettings
key named "PreserveLoginUrl" with "true" as a value.{E53F8FEA-EAE0-44A6-8774-FFD645390401}
with {E3E379DF-F4C6-4180-9B81-6769533ABE47}
. Now save changes and reload the project.Upvotes: 3