をロードできませんでした、私はPagedList 1.10から1.12にアップグレードして以来、私は次のエラーメッセージ取得しています:がAPS.Net MVC 3アプリケーションでファイルまたはアセンブリ「PagedList、バージョン= 1.10.0.0
Could not load file or assembly 'PagedList, Version=1.10.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1' 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 'PagedList, Version=1.10.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 140:
Line 141: kernel.Bind<IEmailService>().To<EmailService>();
Line 142: }
Line 143: }
Line 144:}
Source File: C:\*****\App_Start\NinjectMVC3.cs Line: 142
Assembly Load Trace: The following information can be helpful to determine why the assembly 'PagedList, Version=1.10.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1' could not be loaded.
Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Program Files\IIS Express\iisexpress.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = **\**
LOG: DisplayName = PagedList, Version=1.10.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1
(Fully-specified)
LOG: Appbase = file:///C:/*****/
LOG: Initial PrivatePath = C:\*****\bin
Calling assembly : MvcMembership, Version=3.4.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\*****\web.config
LOG: Using host configuration file: C:\Documents and Settings\jf\My 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: PagedList, Version=1.10.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/b2f5bef1/b2ccbfbe/PagedList.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/b2f5bef1/b2ccbfbe/PagedList/PagedList.DLL.
LOG: Attempting download of new URL file:///C:/*****/bin/PagedList.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Stack Trace:
[FileLoadException: Could not load file or assembly 'PagedList, Version=1.10.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
UpDir.Web.App_Start.NinjectMVC3.RegisterServices(IKernel kernel) in C:\*****\App_Start\NinjectMVC3.cs:142
UpDir.Web.App_Start.NinjectMVC3.CreateKernel() in C:\*****\App_Start\NinjectMVC3.cs:53
Ninject.Web.Mvc.Bootstrapper.Initialize(Func`1 createKernelCallback) in c:\Projects\Ninject\Maintenance2.2\ninject.web.mvc\mvc3\src\Ninject.Web.Mvc\Bootstrapper.cs:61
UpDir.Web.App_Start.NinjectMVC3.Start() in C:\*****\App_Start\NinjectMVC3.cs:35
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
WebActivator.BaseActivationMethodAttribute.InvokeMethod() +221
WebActivator.ActivationManager.RunActivationMethods() +491
WebActivator.ActivationManager.RunPreStartMethods() +28
WebActivator.ActivationManager.Run() +55
[InvalidOperationException: The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
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 Run on type WebActivator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9087676
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
を
これはどこから来ている私は、Web.configファイルに次の行を持っているので、私は理解していない:
<dependentAssembly>
<assemblyIdentity name="PagedList" publicKeyToken="abbb863e9397c5e1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.12.0.0" newVersion="1.12.0.0" />
</dependentAssembly>
私は、これはそれの世話をするだろうと思いました。私もC:\ WINDOWS \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files \ rootを空にしてマシンをリブートしましたが、それは役に立たなかった。
PagedList.dllを呼び出すのがMvcMembership.dllであることがわかりましたが、バージョン1.10をロードする場所がわかりません。
次は何を試すことができますか?
このようなバージョンは存在しませんでしたので、MvcMembershipソースコードをダウンロードし、PagedList 1.12で再コンパイルしました。私はPagedList 1.12へのアップグレード以来、MvcMembershipのすべての機能をテストしていませんが、今は動作しているようです。 私は、私が投稿したWeb.configの行が正しいバージョンのPagedListに向けてリダイレクトすることを考慮しているとも考えました。 –