本文介绍了无法加载文件或程序集'System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我尝试了互联网可能实现的一切。但每次失败。请帮帮我。 无法加载文件或程序集'System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040) 描述:在执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。 异常详细信息:System.IO.FileLoadException:无法加载文件或程序集'System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其中一个依赖。定位的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040) 源错误: 在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。 程序集加载跟踪:以下信息有助于确定无法加载程序集System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35的原因。 WRN:程序集绑定日志记录已关闭。 要启用程序集绑定失败日志记录,请将注册表值[HKLM \Software\Microsoft \Fusion!EnableLog](DWORD)设置为1. 注意:程序集绑定会导致一些性能损失故障记录。 要关闭此功能,请删除注册表值[HKLM\Software\Microsoft\Fusion!EnableLog]。 堆栈跟踪: [FileLoadException:无法加载文件或程序集'System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral ,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040)] Microsoft.Web.Helpers.PreApplicationStartCode.Start()+ 0 [InvalidOperationException:预应用程序启动初始化方法从类型Microsoft.Web开始。 Helpers.PreApplicationStartCode引发了一个异常,出现以下错误消息:无法加载文件或程序集'System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040)。] System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1方法)+423 System.Web.Compilation.BuildManager.CallPreStartInitMethods()+306 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager,IApplicationHost appHost,IConfigMapPathFactory configMapPathFactory,HostingEnvironmentParameters hostingParameters,PolicyLevel policyLevel,Exception appDomainCreationException)+677 [HttpException(0x80004005):预应用程序启动初始化方法启动类型Microsoft.Web.Helpers.PreApplicationStartCode引发异常,并显示以下错误消息:无法加载文件或程序集'System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其中一个依赖项。定位的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040)。] System.Web.HttpRuntime.FirstRequestInit(HttpContext context)+9104104 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)+97 System.Web .HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)+258 解决方案 I tried everything which is possible fron internet. but everytime failure. Please help me.Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)Source Error:An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].Stack Trace:[FileLoadException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] Microsoft.Web.Helpers.PreApplicationStartCode.Start() +0[InvalidOperationException: The pre-application start initialization method Start on type Microsoft.Web.Helpers.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).] System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +423 System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677[HttpException (0x80004005): The pre-application start initialization method Start on type Microsoft.Web.Helpers.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9104104 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258 解决方案 这篇关于无法加载文件或程序集'System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-03 02:38