I've been on a path to upgrade DNN to a more modern version.
This has all been done on a seperate test instance I've setup to verify the steps and make sure everything is working properly, so this error isn't an emergency.
I've followed the recommended version upgrade path, from my current version, which is as follows:
07.04.02 -> 08.00.04 -> 09.01.01 -> 09.03.02 -> 09.13.03
The previous updates went fine, with some minor issues I've worked through. However, I've just upgraded to 09.13.03 and am now getting a server error (listed below).
Things I've tried:
Updating the .NET framework to 4.8.
Adding a dependentAssembly item to the web config:
Any help would be appreciated, thanks!
Server Error in '/' Application. Cannot resolve dependency to assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. 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: Cannot resolve dependency to assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
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.
Stack Trace:
[FileLoadException: Cannot resolve dependency to assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.] System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) +0 System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +50 Owin.Loader.DefaultLoader.GetDefaultConfigurationString(Func`2 defaultTypeNames) +963 Owin.Loader.DefaultLoader.LoadImplementation(String startupName) +154 Owin.Loader.DefaultLoader.Load(String startupName) +23 Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build() +95 System.Lazy`1.CreateValue() +711 System.Lazy`1.LazyInitValue() +436 Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +86 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +573 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369
[HttpException (0x80004005): Cannot resolve dependency to assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +114 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4110.0
That's not too old of a version to upgrade from, in my opinion. I've upgraded some 4.x sites in recent history and we're about to do another one of those soon. 😴
Anyhow, it sounds like there might be a missing DLL or a permissions issue that isn't allowing the DLL to be used by the web application. I'd recommend starting over and reapplying permissions as you go, assuming the DLL is indeed there.
Also, be sure to run Windows update to be sure all updates to the .NET Framework are applied.
Thanks for the support, I was finally able to complete this upgrade.
I first went through the process of just installing a resh DNN 9.13 site, to verify the server itself was able to host it, and that went fine.
I went back and uninstlaled a bunch of extensions on my site before doing the final update, and after doing that, the update was successfull.
I need to go back and do it again, to make sure I know the exact extensions I had uninstalled for my future production update, so once I have the list, I'll add them here in case anyone else has this same problem.
That's a really good point from Daniel. Of course, you should always upgrade any third-party/custom extensions before upgrading whenever possible.
If a third-party module is not built against an appropriate version of DNN, and the correct .NET Framework, it can throw some odd challenges your way. Daniel just reminded me of some frustrating upgrades in the past. 😎
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.