zcz527 / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

Could not load file or assembly 'System.Core, Version=2.0.5.0 #455

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
“/”应用程序中的服务器错误。

未能加载文件或程序集“System.Core, Version=2.0.5.0, Culture=neutral, 
PublicKeyToken=7cec85d7bea7798e, 
Retargetable=Yes”或它的某一个依赖项。给定程序集名称或基本�
��码无效。 (异常来自 HRESULT:0x80131047)

说明: 执行当前 Web 
请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以��
�解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.IO.FileLoadException: 
未能加载文件或程序集“System.Core, Version=2.0.5.0, Culture=neutral, 
PublicKeyToken=7cec85d7bea7798e, 
Retargetable=Yes”或它的某一个依赖项。给定程序集名称或基本�
��码无效。 (异常来自 HRESULT:0x80131047)

源错误: 

执行当前 Web 
请求期间生成了未经处理的异常。可以使用下面的异常堆栈��
�踪信息确定有关异常原因和发生位置的信息。

程序集加载跟踪: 下列信息有助于确定程序集“System.Core, 
Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, 
Retargetable=Yes”未能加载的原因。

=== 预绑定状态信息 ===
日志: 用户 = NT AUTHORITY\NETWORK SERVICE
日志: DisplayName = System.Core, Version=2.0.5.0, Culture=neutral, 
PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes
 (Fully-specified)
日志: Appbase = file:///E:/HuaDuTrade/
日志: 初始 PrivatePath = E:\HuaDuTrade\bin
调用程序集: Autofac, Version=3.0.0.0, Culture=neutral, 
PublicKeyToken=17863af14b0044da。
===
日志: 此绑定从 default 加载上下文开始。
日志: 正在使用应用程序配置文件: E:\HuaDuTrade\web.config
日志: 使用主机配置文件: 
\\?\C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet.config
日志: 使用 
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\config\machine.config 
的计算机配置文件。
日志: 在可移植性配置中找到了 PublicKeyToken 重定向: 
7cec85d7bea7798e 已重定向到 b77a5c561934e089。
日志: 在可移植性配置中找到了 Version 重定向: 2.0.5.0 
已重定向到 4.0.0.0。

堆栈跟踪: 

[FileLoadException: 未能加载文件或程序集“System.Core, 
Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, 
Retargetable=Yes”或它的某一个依赖项。给定程序集名称或基本�
��码无效。 (异常来自 HRESULT:0x80131047)]
   Autofac.Builder.RegistrationData..ctor(Service defaultService) +0
   Autofac.Builder.RegistrationBuilder`3..ctor(Service defaultService, TActivatorData activatorData, TRegistrationStyle style) +80
   Autofac.Features.Scanning.ScanningRegistrationExtensions.RegisterAssemblyTypes(ContainerBuilder builder, Assembly[] assemblies) +164
   Autofac.Integration.Mvc.RegistrationExtensions.RegisterControllers(ContainerBuilder builder, Assembly[] controllerAssemblies) +9
   HuaDu.Web.MvcApplication.ResolveApiDependancy() +223
   HuaDu.Web.MvcApplication.Application_Start() +10

版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 
版本:4.0.30319.1

------------------------------------------------------------------------
Server Configuration

windows server 2003 + iis6 + .net4 + mvc4

------------------------------------------------------------------------

What version of Autofac are you using? On what version of .NET/Silverlight?

Autofac.Integration.Mvc
Autofac.Integration.WebApi

Original issue reported on code.google.com by cnnbgzc on 4 Sep 2013 at 11:29

GoogleCodeExporter commented 8 years ago
I believe you are missing a required patch. Please see the articles below:

http://www.paraesthesia.com/archive/2013/03/29/portable-class-library-answers.as
px

https://code.google.com/p/autofac/wiki/FrequentlyAskedQuestions#Why_are_"old_ver
sions"_of_the_framework_(e.g.,_System.

Updating to the latest .NET Framework version should fix the problem.

Original comment by alex.meyergleaves on 5 Sep 2013 at 11:32