I got an urgent problem that leads to an error "HTTP Error 500.30 - ASP.NET Core app failed to start " when visiting our webshop.
The stdout-log tells me
Unhandled exception. System.Exception: Unable to load one or more of the requested types.
Could not load file or assembly 'FluentMigrator, Version=5.0.0.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05'. Das System kann die angegebene Datei nicht finden.
Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Das System kann die angegebene Datei nicht finden.
---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'FluentMigrator, Version=5.0.0.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05'. Das System kann die angegebene Datei nicht finden.
Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Das System kann die angegebene Datei nicht finden.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, PluginConfig pluginConfig)
System.IO.FileNotFoundException: Could not load file or assembly 'FluentMigrator, Version=5.0.0.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05'. Das System kann die angegebene Datei nicht finden.
File name: 'FluentMigrator, Version=5.0.0.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05'
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Das System kann die angegebene Datei nicht finden.
File name: 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
--- End of inner exception stack trace ---
at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, PluginConfig pluginConfig)
at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, WebApplicationBuilder builder)
at Program.<Main>$(String[] args)
and it's partly correct. the "Microsoft.Extensions.DependencyInjection.Abstractions.dll" DOES exists in the IIS websites root BUT in the version 7.2.0.0.
In my "<plugin>.deps.json" it has a reference to "Microsoft.Extensions.DependencyInjection.Abstractions 8.0.0"
I compared it with another plugins (misc.zettle) "deps.json" file and it contains a reference to
"Microsoft.Extensions.DependencyInjection.Abstractions 7.0.0".
so of coure the misc.zettle plugin works since it asks for version 7 which is in the websites root.
my plugin asks for version 8 but I don't know why.
The "deps.json" is autogenerated, so how do I change the reference to version 7?
my plugins "deps.json" contains references like this:
"Autofac.Extensions.DependencyInjection/8.0.0": {
"dependencies": {
"Autofac": "6.4.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0"}
whereas "misc.zettle.deps.json" contains
"Autofac.Extensions.DependencyInjection/8.0.0": {
"dependencies": {
"Autofac": "6.4.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0"}
So both depend on "Autofac 6.4.0" but on different versions of "dependencyinjection.abstractions"
Ideally, my plugin should NOT ask for a specific version of any reference orelse it can only be used in an environment with all the same dependency versions that my development environment uses.
Also, i compiled the "misc.zettle" plugin myself and... the generated "deps.json" now asks for the references in version 8.0.0
In my production system I installed "nopcommerce 4.60.5 nosource version".
in my dev environment I got the "source code version", of course.
So why does the "source code" generates "deps.json" files that differ from the ones the "nosource version" contains?