dotnet / roslyn-sdk

Roslyn-SDK templates and Syntax Visualizer
MIT License
512 stars 257 forks source link

`Microsoft.CodeAnalysis.Testing.Lightup.ProgrammaticSuppressionInfoWrapper` throws `TypeInitializationException` #1175

Closed foriequal0 closed 1 month ago

foriequal0 commented 1 month ago

Microsoft.CodeAnalysis.Testing.Lightup.ProgrammaticSuppressionInfoWrapper throws TypeInitializationException when there are suppressed diagnostics, from Microsoft.CodeAnalysis version 4.10.0

It tries to make a property accessor of Roslyn's ProgrammaticSuppressionInfo.Suppressions.

It had a type ImmutableHashSet<(string Id, LocalizableString Justification)> before, https://github.com/dotnet/roslyn/blob/db71ffa0e75bab0e69fad83259469cb471f1edbd/src/Compilers/Core/Portable/Diagnostic/ProgrammaticSuppressionInfo.cs#L15 but it's been changed to ImmutableArray<Suppression> after this PR https://github.com/dotnet/roslyn/pull/71207 https://github.com/dotnet/roslyn/blob/969c5177a3fe0a13171c561b45b2d808b9659e56/src/Compilers/Core/Portable/Diagnostic/ProgrammaticSuppressionInfo.cs#L16C16-L16C43

roji commented 1 month ago

We're also encountering this in EF core testing when trying to upgrade from Microsoft.CodeAnalysis 4.8.0 to 4.10.0 (see https://github.com/dotnet/efcore/pull/34116).

Herrmel commented 1 week ago

@sharwell Can we expect an update for the nuget packages some time soon? This bug currently prevents me from updating my Microsoft.CodeAnalysis Packages.