Upgrade fails from 9.8.1 to 9.9.0 - Could not load file or assembly 'MailKit'
See original GitHub issueDescription of bug
Upgrade from 9.8.1 to 9.9.0 gives the error: Exception Details: System.IO.FileLoadException: Could not load file or assembly ‘MailKit’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Steps to reproduce
List the precise steps to reproduce the bug:
- Download the Upgrade package and remove the Block in Properties
- Unzip to DNN directory
- Go to URL: http://localhost/dotnetnuke/install/install.aspx
- See error
Current behavior
Explain the current behavior. Cannot upgrade DNN due to error.
Expected behavior
Provide a clear and concise description of the expected behavior. Upgrade process should not produce an error.
Screenshots
If applicable, provide screenshots to help explain the bug.
Error information
Provide any error information (console errors, error logs, etc.) related to this bug.
[FileLoadException: Could not load file or assembly 'MailKit' 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 'MailKit, Version=2.7.0.0, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b' 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 'MailKit, Version=2.7.0.0, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b' 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) +310 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 'MailKit, Version=2.7.0.0, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b' 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) +10087352 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263 --
Additional context
Provide any additional context that may be helpful in understanding and/or resolving the bug. I looked in the Upgrade zip file for the MailKit manifest but could not easily locate it.
Upgrade file was DNN_Platform_9.9.0_Upgrade.zip
Affected version
- 10.00.00 alpha build
- [ X] 09.09.00 release
- 09.08.01 latest supported release
Affected browser
- Chrome
- [X ] Firefox
- Safari
- Internet Explorer 11
- Microsoft Edge (Classic)
- Microsoft Edge Chromium
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (4 by maintainers)
Yes, the updated version of their Common Library (v4.0.6) fixes both MailKit and MimeKit issues. However, I don’t see that version on the public download list yet. You could try contacting them directly for it, I suppose.
Mandeeps support has prepared an updated version of their Common Library (v4.0.6) which fixes the issue and should be published soon.