DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Upgrade error 9.10.0 to 9.10.2 Microsoft.Extensions.DependencyInjection.Abstractions

 3 Replies
 1 Subscribed to this topic
 33 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 6
New Around Here

I am trying to upgrade from 9.10.0 to 9.10.2 but upon unzipping the package I get this error:

Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60

*I will include the full message at the bottom. 

I unblocked the zip before extracting. I searched and found similar errors related to 2sxc and so I removed it; although I am not sure it is fully or properly removed as I ran into errors with that also. Right now it 2sxc modules are not in my extensions list though. This DNN instance is running on Windows 2012 server with IIS 8 and DNN shows the .NET version as 4.8. 

Has anyone encountered this error and found a solution? 

*****Here is the full error*****

Server Error in '/' Application.


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)

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:

 

<code>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.</code>


Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Extensions.DependencyInjection.Abstractions' could not be loaded.
 

<code>WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value &#91;HKLM\Software\Microsoft\Fusion!EnableLog&#93; (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value &#91;HKLM\Software\Microsoft\Fusion!EnableLog&#93;.
</code>


Stack Trace:
 

<code>&#91;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)&#93;

&#91;FileLoadException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.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)&#93;
   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.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +232
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +48

&#91;ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.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)&#93;
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +767
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +256
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +58
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +287
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +69
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +137
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +172
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +854

&#91;HttpException (0x80004005): Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.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)&#93;
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724
</code>

 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4330.0

 

 

Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!

Have a look at the /bin folder of your installation. Do you see a file called Microsoft.Extensions.DependencyInjection.Abstractions.dll? If yes, right click the file, go to properties and check on the Details tab if the file version is 2.1.1.18157. Then you have the file that is delivered with DNN 09.10.02.

Your error message indicates that a newer version of this assembly is needed: Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0 - therefore I think that you have an extension installed that is dependent on this newer version. Check the file in your DNN 09.10.00 installation (or backup), and if this has version 2.2.0.0 copy it over the existing file in your DNN 09.10.02 installion.

Does that help?

Happy DNNing!
Michael

Michael Tobisch
DNN★MVP

DNN Connect
New Around Here
Posts: 6
New Around Here

Yes! That worked. Thank you very much.

I made a copy of the 2.2.0 version so I could copy it back into the bin folder after the upgrade extraction.

Veteran Member
Posts: 1182
Veteran Member
MVP
MVP
You're an MVP!

Glad I could help!

Anyway you should try to find out which extension installed the newer assembly over the existing one in DNN and tell the vendor. Otherwise you will have an error like this on every upgrade (until DNN moves to that newer DLL), and in my eyes it is not a good practice to use newer assemblies that the existing ones and overwrite files that exist in DNN.

As a DNN upgrade package is the same as the install package without the web.config file you will always overwrite existing files when unzipping the package.

Happy DNNing!
Michael

 

Michael Tobisch
DNN★MVP

DNN Connect

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved