microsoft / perfview

PerfView is a CPU and memory performance-analysis tool
http://channel9.msdn.com/Series/PerfView-Tutorial
MIT License
4.14k stars 707 forks source link

Microsoft.Diagnostics.Tracing.TraceEvent has an undeclared dependency on System.Collections.Immutable #1989

Closed yaakov-h closed 7 months ago

yaakov-h commented 8 months ago

In the NuGet package https://www.nuget.org/packages/Microsoft.Diagnostics.Tracing.TraceEvent which links here, Microsoft.Diagnostics.Tracing.TraceEvent.dll is compiled for netstandard2.0 but includes an additional assembly reference to System.Collections.Immutable.

This additional reference is not reflected as a NuGet dependency, so consumers are not guaranteed to have the correct version of System.Collections.Immutable or to have it present at all.

Microsoft.Diagnostics.Tracing.TraceEvent v3.1.7 contained an assembly reference to System.Collections.Immutable v1.2.5.0, which is relatively old and easy to slip under the radar.

Microsoft.Diagnostics.Tracing.TraceEvent v3.1.8 now contains an assembly reference to System.Collections.Immutable v8.0.0.0, which is quite recent and is tripping up assembly binding redirect issues in some of my .NET Framework projects.

This additional dependency ought to be declared in the NuGet metadata so that consumers can ensure that they have the appropriate runtime dependencies, and to avoid assembly conflict warnings.

brianrob commented 8 months ago

Thanks for reporting this @yaakov-h. I have posted #1994 to address this.