It seems like Kentico is still trying to load version 11 Assemblies after the upgrade from 11 to 12. This is a portal engine upgrade. I have tried both the automated Upgrade installer, and doing a manual upgrade where I start with a base Kentico 12 site and move my custom files over.
Stack trace of the error:
Line 16: #endif
Line 17: // Initialize CMS application. This method should not be called from custom code.
Line 18: InitApplication(Assembly.GetExecutingAssembly());
Line 19: }
Line 20: }
Source File: C:\Users\miket\OneDrive\Documents\GIT\CLR-NEW\CMS\App_Code\Global.asax.cs Line: 18
Assembly Load Trace: The following information can be helpful to determine why the assembly 'CMS.Base, Version=11.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' could not be loaded.
Could not load file or assembly 'CMS.Base, Version=11.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I have checked CMS.Base and countless other assemblies and they are all version 12. Where can I see what is referencing the incorrect assembly, because this error doesn't seem to be helping.
Full trace below:
[FileLoadException: Could not load file or assembly 'CMS.Base, Version=11.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0
System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +197
System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +166
System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +156
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +612
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +149
System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit) +104
System.Reflection.CustomAttributeExtensions.GetCustomAttributes(Assembly element) +58
CMS.Core.TypeManager.PreInitializeTypes(Assembly assembly) +126
CMS.Core.TypeManager.PreInitializeTypes() +241
CMS.Core.ModuleEntryManager.PreInit() +26
CMS.Core.AppCore.PreInit() +113
CMS.DataEngine.CMSApplication.PreInit() +119
CMS.DataEngine.CMSHttpApplication.InitApplication(Assembly webProjectAssembly) +65
Global..cctor() in C:\Users\miket\OneDrive\Documents\GIT\CLR-NEW\CMS\App_Code\Global.asax.cs:18
[TypeInitializationException: The type initializer for 'Global' threw an exception.]
Global..ctor() +0
ASP.global_asax..ctor() +42
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +142
System.Activator.CreateInstance(Type type, Boolean nonPublic) +107
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1476
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +82
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +174
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737