Error Upgrading from v9 to v10

Andre Pfanz asked on July 28, 2019 20:28

We are in the process of upgrading our site from v9 to v12. After upgrading to v10 and using the Azure Emulator to run the site locally, I get this error:

Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics' 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.WindowsAzure.Diagnostics' 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.WindowsAzure.Diagnostics, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +225 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +110 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +22 System.Reflection.Assembly.Load(String assemblyString) +34 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +48

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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) +725 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +247 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +157 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +226 System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +73 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +319 System.Web.Compilation.BuildManager.ExecutePreAppStart() +170 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +820

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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) +523 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +107 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +688

Recent Answers


Roman Hutnyk answered on July 29, 2019 10:21

Do yo get the same error locally as well? Or only at Azure Emulator?

Are you using Kentico Upgrade tool? Or doing upgrade manually?

It looks like Microsoft.WindowsAzure.Diagnostics is missed or another version should be used

0 votesVote for this answer Mark as a Correct answer

Andre Pfanz answered on July 29, 2019 15:32

I tried running the app locally by setting the CMSApp to be the default project in VS.NET and running in debug mode but still get the same error.

We used the Kentico Upgrade tool and did not upgrade it manually.

I downloaded Azure SDK 2.9 and installed it. I'm using VS.NET 2015 Community Edition.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.