I have an application deployed in Azure, since this morning I starting receiving this error:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Diagnostics.DiagnosticListener' threw an exception. ---> System.TypeLoadException: Could not load type 'System.Diagnostics.ProductionBreakpointsStub' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. at __EnsureBootstrap__System.Diagnostics.DiagnosticSource.dll() at System.Diagnostics.DiagnosticListener..cctor() --- End of inner exception stack trace --- at System.Diagnostics.DiagnosticListener..ctor(String name) at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors) at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at MotionCatalyst.Online.Program.Main(String[] args)
My application is a asp.net core app but target the full framework.
This is the project file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Locally is working. any help?