Summary
After upgrading from Microsoft.Diagnostics.Tracing.TraceEvent version 3.1.13 to 3.1.23, GCHeapDump constructor fails with a TypeLoadException when trying to load .gcdump
files.
Error Message
Error: Could not load type 'FastSerialization.SerializationConfiguration' from assembly 'Microsoft.Diagnostics.FastSerialization, Version=3.1.23.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
Environment
- .NET 8.0 application targeting netstandard2.0
- Microsoft.Diagnostics.Tracing.TraceEvent: 3.1.23 (fails) vs 3.1.13 (works)
Steps to Reproduce
- Create a .NET application that uses Microsoft.Diagnostics.Tracing.TraceEvent 3.1.23
- Try to instantiate GCHeapDump with a valid .gcdump file:
var heapDump = new GCHeapDump(filePath); // Throws TypeLoadException
Expected Behavior
GCHeapDump should load the file successfully, as it does with TraceEvent 3.1.13.
Actual Behavior
Application crashes with TypeLoadException looking for FastSerialization.SerializationConfiguration.
Analysis
Based on the #2121, SerializationConfiguration was renamed to SerializationSettings. However, it appears that some internal
code in TraceEvent 3.1.23 is still trying to reference the old SerializationConfiguration class name.
Additional Context
This affects any application that uses GCHeapDump to programmatically analyze .NET heap dumps. The issue appears to be internal to the TraceEvent library during
deserialization of the dump file format.
Summary
After upgrading from Microsoft.Diagnostics.Tracing.TraceEvent version 3.1.13 to 3.1.23, GCHeapDump constructor fails with a TypeLoadException when trying to load .gcdump
files.
Error Message
Error: Could not load type 'FastSerialization.SerializationConfiguration' from assembly 'Microsoft.Diagnostics.FastSerialization, Version=3.1.23.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
Environment
Steps to Reproduce
var heapDump = new GCHeapDump(filePath); // Throws TypeLoadException
Expected Behavior
GCHeapDump should load the file successfully, as it does with TraceEvent 3.1.13.
Actual Behavior
Application crashes with TypeLoadException looking for FastSerialization.SerializationConfiguration.
Analysis
Based on the #2121, SerializationConfiguration was renamed to SerializationSettings. However, it appears that some internal
code in TraceEvent 3.1.23 is still trying to reference the old SerializationConfiguration class name.
Additional Context
This affects any application that uses GCHeapDump to programmatically analyze .NET heap dumps. The issue appears to be internal to the TraceEvent library during
deserialization of the dump file format.