-
Notifications
You must be signed in to change notification settings - Fork 171
Description
Getting a GC-dump on a published app fails with the following error at runtime:
An unhandled exception occurred while processing the request.
FileNotFoundException: Could not load file or assembly 'dotnet-gcdump, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, ref StackCrawlMark stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, bool throwOnFileNotFound)
FileNotFoundException: Could not load file or assembly 'dotnet-gcdump, Version=9.0.13.2701, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Steeltoe.Management.Endpoint.Actuators.HeapDump.HeapDumper+<>c__DisplayClass6_0.b__0(TextWriter logWriter)
InvalidOperationException: Failed to create a gcdump. Captured log:
Steeltoe.Management.Endpoint.Actuators.HeapDump.HeapDumper.CaptureLogOutput(Func<TextWriter, bool> action, string dumpDescription, CancellationToken cancellationToken) in HeapDumper.cs, line 159
During dotnet publish, the following warning appears:
warning MSB3245: Could not resolve this reference. Could not locate the assembly "dotnet-gcdump". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Used configuration:
{
// Steeltoe: Add schema to get auto-completion.
"$schema": "https://steeltoe.io/schema/latest/schema.json",
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Steeltoe": "Trace"
}
},
"Management": {
"Endpoints": {
"Health": {
"ShowComponents": "Always",
"ShowDetails": "Always"
},
"HeapDump": {
"HeapDumpType": "GCDump"
},
"Actuator": {
"Exposure": {
"Include": [ "*" ]
}
}
}
},
"AllowedHosts": "*"
}