In several attempts to upgrade my localhost from 9.3.2 to 9.4 using "DNN_Platform_9.4.0_Upgrade.zip" I get an error when accessing the site after unzipping the files to the server.
Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Here is the full error message. Any ideas on the problem?
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 'Microsoft.Extensions.DependencyInjection.Abstractions' 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 'Microsoft.Extensions.DependencyInjection.Abstractions' could not be loaded.
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileLoadException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
[FileLoadException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +37 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +159 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +80 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +22 System.Reflection.Assembly.Load(String assemblyString) +29 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +39
[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +777 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +229 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +140 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +176 System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +99 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +307 System.Web.Compilation.BuildManager.ExecutePreAppStart() +165 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +590
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10084464 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4001.0
Posted By Sebastian Leupold on 13 Sep 2019 06:37 AM did you unblock the downloaded upgrade package prior to unzipping the files contained?
Yes, unblocked the zip. I even downloaded and unblocked the zip again. Thanks for responding.
I also tried restoring back to 9.3.1 and upgrading to 9.3.2 (which worked fine), then tried upgrade to 9.4.0 which failed again the same way. I've now restored the 9.3.2 backup just prior to 9.4 upgrade.
Do you think it could have anything to do with .NET version? The error message says at the bottom:
It is Windows 10 Pro with the latest updates and the registry says .Net is 4.8: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full "528040" (Windows 10 May 2019 Update)
I don't know why error message says it is 4.0.30319
Posted By Dave Madison on 13 Sep 2019 12:23 PM Hi Top Cat, I had the same error when I upgraded from 9.32 to 9.4. I first had to install .net framework 4.7.2. And then had to update the web.config file to reference 4.7.2 in two different places. The first was in the "compilation" tag. change the targetFramework to 4.7.2 The other is in the "httpruntime" tag. change the targetFramework to 4.7.2
Thanks Dave. I updated your response in my quote of your message above to show the stripped-out tags in quotes.
I tried your solution by downloading and installing the 4.7.2 Developers Pack (because when I tried to install the Runtime it said it or a later version was already installed). I updated the two lines (which were 4.5) and tried my site without updating. Everything worked okay. I then did the update to 9.4 and got the same error as before.
I am wondering about the error message (that I have now made fully readable in the OP). It lists the version as being 1.1.0.0:
" [FileLoadException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0, Culture=..."
Yet in the Install\bin folder in the update package, that file has this version number: 2.1.1.18157
Could that be what it is complaining about, since it gives this reason for the error...?
"The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
I found the problem and fixed it.
The web.config had a binding that pointed to version 1.1.0 of the file (angle brackets replaced below with square braces):
[!--Upgraded by 2SexyContent version 10.1.0 - Date: 5/31/2019 8:27:39 AM--] [!--[dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"][assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" /][bindingRedirect oldVersion="0.0.0.0-32767.32767.32767.32767" newVersion="1.1.0.0" /] [/dependentAssembly]--] [dependentAssembly] [assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" /] [bindingRedirect oldVersion="0.0.0.0-32767.32767.32767.32767" newVersion="1.1.0.0" /] [/dependentAssembly]
This is where that version was coming from, 2SexyContent version 10.1.0. Commenting out that code in the web.config allowed the upgrade install process to work. However, 2SexyContent no longer worked, giving an error about not having version 1.1.0 of that file. Upgrading to 2SexyContent version 10.5 fixed that problem. Notice how they have changed their web.config in the [runtime] section to specify the URL for where to find the version of the file they want to use...
[!--Upgraded by 2SexyContent version 10.5.0 - Date: 9/13/2019 4:52:25 PM--] [dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"] [assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" /] [codeBase version="1.1.0.0" href="bin\2sxc\Microsoft.Extensions.DependencyInjection.Abstractions.dll" /] [bindingRedirect oldVersion="0.0.0.0-1.32767.32767.32767" newVersion="1.1.0.0" /] [/dependentAssembly]
This allows them to have their version and DNN to have the default version. Problem solved.
I've got the same issue.
Upgraded from 9.2.2.178
I have 2Sexy 10.2 installed.
The annoying thing is I'm not really using it yet.
After commenting out all the entries in web.config from 2Sexy, I'm still getting this error:
Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. 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.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
Source Error:
Assembly Load Trace: The following information can be helpful to determine why the assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' could not be loaded.
[FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.] DotNetNuke.Web.Startup.Configure() +0 DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication.Application_Start(Object sender, EventArgs eventArgs) +174
[HttpException (0x80004005): Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10093517 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +218 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10074716 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254 This is coming from
<!--Upgraded by 2SexyContent version 10.2.0 - Date: 8/3/2019 9:36:13 AM--> <!----> <!-- -->
I even deleted it from the web.config.
I can go back to 9.2.2.178, but the personabar is broken.
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.