.net - Unable to update NuGet package "Microsoft ASP.NET MVC" from version 4.0.20710.0 to 5.1.2 -


i have following out of date package in nuget:

enter image description here

however, when click on update button, following error:

error: updating 'microsoft.aspnet.mvc 4.0.20710.0' 'microsoft.aspnet.mvc 5.1.2' failed.

unable find version of 'aspnetmvc' compatible 'microsoft.aspnet.mvc 5.1.2'.

this happens on both projects use package:

enter image description here

i'm running on .net 4.5 framework on both projects. there can upgrade package, or not compatible 4.5, or should using different nuget package now?

as far can tell, upgrading 4.5.1 did not fix problem. in fact able fix while leaving target framework 4.5.

here black magic performed seemed fix it. first, uninstall 3 old mvc libraries (as suggested in comment), reinstall new ones, rebuild. @ least part in nuget manage packages ui, update failed in same place. @ point nuget happy, can compile, app not work.

next, sure follow absolutely every step in upgrade asp.net 4 document referenced in other comment. when accidentally omitted 1 step, i'd strange, non-intuitive errors (obvious in retrospect). example, have update 2 separate web.config files, root , 1 in views directory. have find old version numbers , change them manually in one, root web.config automatically fixed you. otherwise i'd see scary errors "inheritance security rules violated type system.web.webpages.razor.webpagerazorhost" , on. should have copied down each error message posterity suppose, point every error i'd go upgrade guide, check steps, realize missed one, fix , new error until went away.

there news. in case @ least, despite dire warnings have go find incompatibilities, rest of app worked before without changes.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -