We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrading my .net application from 8.0 to 9.0, the application crashes each time the code reaches this line: var app = builder.Build();
var app = builder.Build();
After spending hours of debugging it turns out that it's related to CallerInfo Enricher:
public static LoggerConfiguration WithCallerInfo( this LoggerEnrichmentConfiguration enrichmentConfiguration, bool includeFileInfo, string assemblyPrefix, string prefix = "", string startingAssembly = "", int filePathDepth = 0, IEnumerable<string> excludedPrefixes = null) { var startingAssemblies = new Stack<Assembly>(); if (string.IsNullOrWhiteSpace(startingAssembly)) { startingAssemblies.Push(Assembly.GetCallingAssembly()); startingAssemblies.Push(Assembly.GetEntryAssembly()); } else { startingAssemblies.Push(Assembly.Load(startingAssembly)); } var referencedAssemblies = GetAssemblies(startingAssemblies, asm => asm.Name?.StartsWith(assemblyPrefix, StringComparison.OrdinalIgnoreCase) ?? false, asm => excludedPrefixes?.Any(excluded => asm?.Name?.StartsWith(excluded, StringComparison.OrdinalIgnoreCase) ?? false) ?? false); return enrichmentConfiguration.WithCallerInfo(includeFileInfo, referencedAssemblies, prefix, filePathDepth); }
The application crashes, when it reaches this line on the WithCallerInfo method: Assembly.GetCallingAssembly()
WithCallerInfo
Assembly.GetCallingAssembly()
I tried to debug it and ran this method on the Watch window on Visual Studio and got this error:
The target process exited with code -1073740791 (0xC0000409) while evaluating the function 'System.Reflection.Assembly.GetCallingAssembly'.
It seems that there is an issue regarding GetCallingAssembly on dotnet 9.0
GetCallingAssembly
The text was updated successfully, but these errors were encountered:
No branches or pull requests
After upgrading my .net application from 8.0 to 9.0, the application crashes each time the code reaches this line:
var app = builder.Build();
After spending hours of debugging it turns out that it's related to CallerInfo Enricher:
The application crashes, when it reaches this line on the
WithCallerInfo
method:Assembly.GetCallingAssembly()
I tried to debug it and ran this method on the Watch window on Visual Studio and got this error:
It seems that there is an issue regarding
GetCallingAssembly
on dotnet 9.0The text was updated successfully, but these errors were encountered: