gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 18:14:59 63 4
gpt4 key购买 nike

我将 MVC5 项目更新为 MVC5.1,现在路由字典出现异常:

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

堆栈跟踪:

{"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

最佳答案

在引用文献中,我发现System.Web.WebPages.dll版本3.0.11001.0显示这种类型的错误,但是当我将其替换为System时.Web.WebPages.dll版本3.0.20129.0它可以工作。因此,您只需从引用中删除旧版本并下载其他版本,然后干净的解决方案重建,它就会起作用。

关于asp.net-mvc-5 - Mvc 5.1 MissingMethodException System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21376261/

63 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com