Skip to content

Use ReferenceAssemblies.Net.Net110 once Microsoft.CodeAnalysis.Testing ships it #5549

Description

@jamescrosswell

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeTaskupstream-watchUpstream vendored code has changed — review required

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions