Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
893 views
in Technique[技术] by (71.8m points)

asp.net mvc 5 - Mvc 5.1 MissingMethodException System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached

I'm update my MVC5 project to MVC5.1 and now have exception on route dictionary:

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

stack trace:

{"Method not found: 'System.Web.Routing.RouteValueDictionary System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached(System.Object)'."}

at System.Web.Mvc.RouteCollectionExtensions.CreateRouteValueDictionaryUncached(Object values)
at System.Web.Mvc.RouteCollectionExtensions.IgnoreRoute(RouteCollection routes, String url, Object constraints)
at System.Web.Mvc.RouteCollectionExtensions.IgnoreRoute(RouteCollection routes, String url)
at WebApplication1.RouteConfig.RegisterRoutes(RouteCollection routes) in c:UsersaivanovDocumentsVisual Studio 2013ProjectsWebApplication1WebApplication1App_StartRouteConfig.cs:line 14
at WebApplication1.MvcApplication.Application_Start() in c:UsersaivanovDocumentsVisual Studio 2013ProjectsWebApplication1WebApplication1Global.asax.cs:line 17
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In the References i found that System.Web.WebPages.dll version 3.0.11001.0 shows this type of error, but when i replace it with System.Web.WebPages.dll version 3.0.20129.0 it works. So Simply you should delete the old one from refrences and download the other version and than clean solution, rebuild and it will work.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...