- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我在我的项目中使用 umbraco 4.11.3。我的项目在 Windows 7 上运行良好,并从 visual studio 2012 运行它。但是当它从 visual studio 2012 运行时,它在 Win 8 中不起作用!
错误是:
Could not load file or assembly 'System.Web.Mvc, 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.Mvc, 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.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
=== Pre-bind state information === LOG: User = Jahan-PC\jahan LOG: DisplayName = System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Appbase = file:///G:/20130204/SourceCode/Defraz.Movafaqiyat.WebApp/Defraz.Movafaqiyat.WebApp/ LOG: Initial PrivatePath = G:\20130204\SourceCode\Defraz.Movafaqiyat.WebApp\Defraz.Movafaqiyat.WebApp\bin Calling assembly : ClientDependency.Core.Mvc, Version=1.5.1.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: Using application configuration file: G:\20130204\SourceCode\Defraz.Movafaqiyat.WebApp\Defraz.Movafaqiyat.WebApp\web.config LOG: Using host configuration file: C:\Users\jahan\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 LOG: Attempting download of new URL file:///C:/Users/jahan/AppData/Local/Temp/Temporary ASP.NET Files/root/bc5b37d0/42db0b24/System.Web.Mvc.DLL. LOG: Attempting download of new URL file:///C:/Users/jahan/AppData/Local/Temp/Temporary ASP.NET Files/root/bc5b37d0/42db0b24/System.Web.Mvc/System.Web.Mvc.DLL. LOG: Attempting download of new URL file:///G:/20130204/SourceCode/Defraz.Movafaqiyat.WebApp/Defraz.Movafaqiyat.WebApp/bin/System.Web.Mvc.DLL. WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Stack Trace:
[FileLoadException: Could not load file or assembly 'System.Web.Mvc, 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)]
ClientDependency.Core.Mvc.MvcFilter.ValidateCurrentHandler() +0
ClientDependency.Core.Module.ClientDependencyModule.b__0(IFilter f) +31 System.Linq.Enumerable.Any(IEnumerable1 source, Func
2 predicate) +146
ClientDependency.Core.Module.ClientDependencyModule.ValidateCurrentHandler(IEnumerable`1 filters) +127
ClientDependency.Core.Module.ClientDependencyModule.HandleRequest(Object sender, EventArgs e) +179
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
注意:在IIS上发布的项目在win7和win8下运行良好。 我的项目不是基于 ASP.NET MVC。请帮助我。
最佳答案
我们正在使用 Azure 云运行部署,但我遇到了同样的错误。由于您无法真正将包安装到服务器实例上,解决此问题的方法是进入项目的引用,找到它提示缺少的库的引用,进入属性,然后将 Copy Local 设置为 True。重新部署,一切就绪。
关于c# - 无法加载文件或程序集 System.Web.Mvc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14694551/
我是一名优秀的程序员,十分优秀!