Skip to content

Remove stale net6.0/net7.0 verified snapshots left behind when those TFMs were dropped #5530

Closed

Description

@jamescrosswell

Description

test/Sentry.Tests/ still carries six Verify snapshots for target frameworks the repo no longer builds:

test/Sentry.Tests/SentryOptionsTests.Integrations_default_ones_are_properly_registered.DotNet6_0.DotNet.verified.txt
test/Sentry.Tests/SentryOptionsTests.Integrations_default_ones_are_properly_registered.DotNet6_0.OSX.DotNet.verified.txt
test/Sentry.Tests/SentryOptionsTests.Integrations_default_ones_are_properly_registered.DotNet6_0.Windows.DotNet.verified.txt
test/Sentry.Tests/SentryOptionsTests.Integrations_default_ones_are_properly_registered.DotNet7_0.DotNet.verified.txt
test/Sentry.Tests/SentryOptionsTests.Integrations_default_ones_are_properly_registered.DotNet7_0.OSX.DotNet.verified.txt
test/Sentry.Tests/SentryOptionsTests.Integrations_default_ones_are_properly_registered.DotNet7_0.Windows.DotNet.verified.txt

SentryOptionsTests.Integrations_default_ones_are_properly_registered uses .UniqueForTargetFrameworkAndVersion(), so Verify only ever looks for a snapshot matching a TFM currently being built. net6.0 and net7.0 were dropped in #3807 (cb0a35c), which did not remove the corresponding snapshots — they have been dead files since December 2024. They were last written by #3052.

Nothing references them and no test can select them, so they are safe to delete.

Why it is worth doing

They are actively misleading when working on TFM changes: a find/grep over *.verified.txt suggests those frameworks are still covered, and it is not obvious without checking git history that the files are orphans rather than snapshots for a TFM built somewhere else (Windows-only, mobile, etc.).

Notes

  • Spotted while working on Add support for .net 11 preview 7 #5527 / feat: add support for .NET 11 preview 7 #5529 (.NET 11 support). That PR deletes the DotNet8_0 and DotNet9_0 snapshots as part of dropping those TFMs, so this issue is only about the older net6.0/net7.0 leftovers. Doing it separately keeps that diff focused.
  • Worth a quick sweep for the same pattern elsewhere rather than just deleting these six — anything matching a TFM not in $(CurrentTfms) and not one of the deliberately platform-specific suffixes (Net4_8, Mono4_0).
  • A cheap guard against a recurrence would be a check that every *.<TFM>.verified.txt suffix corresponds to a TFM the repo builds, though that may be more machinery than it is worth.

Activity

  1. linear-code commented on Sep 1, 2026

    @linear-code
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 codeTask

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions