MVC 5.1 MissingMethodException System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached [英] Mvc 5.1 MissingMethodException System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached

查看:2846
本文介绍了MVC 5.1 MissingMethodException System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更新我MVC5项目MVC5.1,现在有航线字典异常:

  routes.IgnoreRoute({}资源个.axd / {*} PATHINFO);

堆栈跟踪:

  {未找到方法:'System.Web.Routing.RouteValueDictionary System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached(System.Object的)'。}在System.Web.Mvc.RouteCollectionExtensions.CreateRouteValueDictionaryUncached(Object值)
在System.Web.Mvc.RouteCollectionExtensions.IgnoreRoute(RouteCollection路线,字符串的URL,对象约束)
在System.Web.Mvc.RouteCollectionExtensions.IgnoreRoute(RouteCollection路线,字符串URL)
在用C WebApplication1.RouteConfig.RegisterRoutes(RouteCollection路线):\\用户\\ aivanov \\文档\\的Visual Studio 2013 \\项目\\ WebApplication1 \\ WebApplication1 \\ App_Start \\ RouteConfig.cs:14号线
在WebApplication1.MvcApplication.Application_Start()在C:\\用户\\ aivanov \\文档\\的Visual Studio 2013 \\项目\\ WebApplication1 \\ WebApplication1 \\的Global.asax.cs:17行


解决方案

在引用我发现的 System.Web.WebPages.dll 版本的 3.0.11001.0 显示了这种类型的错误,但是当我是 System.Web.WebPages.dll 版本替换 3.0.20129.0 它的工作原理。所以,只要你应该删除refrences旧并下载其他版本,比干净的解决方案 重建,它会正常工作。

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:\Users\aivanov\Documents\Visual Studio 2013\Projects\WebApplication1\WebApplication1\App_Start\RouteConfig.cs:line 14
at WebApplication1.MvcApplication.Application_Start() in c:\Users\aivanov\Documents\Visual Studio 2013\Projects\WebApplication1\WebApplication1\Global.asax.cs:line 17

解决方案

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.

这篇关于MVC 5.1 MissingMethodException System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆