我已经安装了MVC4和MVC3应用程序,我现在正在给我带来问题。我收到错误:
无法加载文件或程序集'System.Web.WebPages,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。定位的程序集的清单定义与程序集引用
不匹配但是,我在我的代码中找不到任何关于WebPages v2的引用,我想知道为什么我会收到此错误。有人可以帮忙吗?
编辑:这是完整的堆栈跟踪:
[FileLoadException:无法加载文件或程序集'System.Web.WebPages,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。 (HRESULT异常:0x80131040)]
C:\ Users \ M \ Desktop \ Development \ ASP.NET projects \ ljMVC \ ljMVC \ ljMVC \ Helpers \ EditableHelpers中的ljMVC.Helpers.EditableHelpers.Editable(HtmlHelper helper,String htmlElement,String cssId,String defaultContent,Object htmlAttributes)。 CS:90
e:\ web \ lovelyjubbl \ htdocs \ Areas \ Gameplan \ Views \ MainGP \ Index.cshtml中的ASP._Page_Areas_Gameplan_Views_MainGP_Index_cshtml.Execute():85
System.Web.WebPages.WebPageBase.ExecutePageHierarchy()+208
System.Web.Mvc.WebViewPage.ExecutePageHierarchy()+89
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext,TextWriter writer,WebPageRenderingBase startPage)+78
System.Web.Mvc.RazorView.RenderView(ViewContext viewContext,TextWriter writer,Object instance)+199
System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext,TextWriter writer)+107
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)+291
System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext,ActionResult actionResult)+13
System.Web.Mvc。<> c_ DisplayClass1c.b _19()+23
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter过滤器,ResultExecutingContext preContext,Func 1 continuation) +264
System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList
1过滤器,ActionResult actionResult)+176
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext,String actionName)+329
System.Web.Mvc.Controller.ExecuteCore()+115
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)+94
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)+10
System.Web.Mvc。&lt;&gt; c_ DisplayClassb.b _5()+37
System.Web.Mvc.Async。&lt;&gt; c_ DisplayClass1.b _0()+ 21
System.Web.Mvc.Async。&lt;&gt; c_ DisplayClass8 1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult
1.End()+55
System.Web.Mvc。&lt;&gt; c _DisplayClasse.b_ d()+31
System.Web.Mvc.SecurityUtil.b _0(动作f)+7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)+23
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)+59
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)+9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+8970061
System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean&amp; completedSynchronously)+184
答案 0 :(得分:0)
下面:
EditableHelpers.cs:90
我猜你正在使用一些NuGet或依赖于WebPages 2.0的东西(a.k.a System.Web.WebPages, Version=2.0.0.0
)。你可能已经更新了这个NuGet或者它是什么,现在你对这个程序集有了依赖性。