TroyGoode/MembershipStarterKit — Issue #24: Upgrading to PagedList 1.12 breaks MvcMembership 
Author: velum
Created: 2012-02-06 15:47:03+00:00
State: open

Although MvcMembership is said to be compatible with PagedList >= 1.10, it won't work with version 1.12. Since I upgrade, I am getting the following error message:

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().To();
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