Description
test/Sentry.Compiler.Extensions.Tests/Testing/ReferenceAssembliesExtensions.cs declares its own net11.0 ReferenceAssemblies entry, because Microsoft.CodeAnalysis.Testing doesn't ship one - the newest it has is Net100, in 1.1.3 and 1.1.4 alike.
Falling back to Net100 does not work: the analyzer test snippets reference a net11.0-built Sentry.dll, which pulls System.Runtime 11.0.0.0 and fails against .NET 10 reference assemblies:
error CS1705: Assembly 'Sentry' ... uses 'System.Runtime, Version=11.0.0.0' which has a
higher version than referenced assembly 'System.Runtime, Version=10.0.0.0'
So the local declaration pins Microsoft.NETCore.App.Ref to a specific preview version, which has to be kept in step with global.json on every SDK bump.
What to do
When the package ships ReferenceAssemblies.Net.Net110, delete the local declaration and use it, removing the hard-coded reference-pack version. There's a TODO at the call site.
Refs
Description
test/Sentry.Compiler.Extensions.Tests/Testing/ReferenceAssembliesExtensions.csdeclares its ownnet11.0ReferenceAssembliesentry, becauseMicrosoft.CodeAnalysis.Testingdoesn't ship one - the newest it has isNet100, in 1.1.3 and 1.1.4 alike.Falling back to
Net100does not work: the analyzer test snippets reference anet11.0-builtSentry.dll, which pullsSystem.Runtime 11.0.0.0and fails against .NET 10 reference assemblies:So the local declaration pins
Microsoft.NETCore.App.Refto a specific preview version, which has to be kept in step withglobal.jsonon every SDK bump.What to do
When the package ships
ReferenceAssemblies.Net.Net110, delete the local declaration and use it, removing the hard-coded reference-pack version. There's aTODOat the call site.Refs