Skip to content

Suppress legacy target framework build warnings and retarget tool projects to net10.0#806

Merged
bitfaster merged 3 commits intomainfrom
copilot/suppress-build-warnings-net-versions
May 5, 2026
Merged

Suppress legacy target framework build warnings and retarget tool projects to net10.0#806
bitfaster merged 3 commits intomainfrom
copilot/suppress-build-warnings-net-versions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

Several projects still target netcoreapp3.1 and net6.0 for compatibility, which now surfaces end-of-support and unsupported-TFM build warnings. This change keeps builds clean by suppressing those specific warnings in the remaining legacy-targeted projects, while retargeting the tool projects that no longer need net6.0 to net10.0.

  • Scope

    • Applies only to projects that currently target out-of-support frameworks and emit these warnings during build.
    • Retargets tool projects that do not need legacy framework support.
    • Leaves unrelated warnings untouched.
  • Project updates

    • Added CheckEolTargetFramework=false where SDK EOL warnings (NETSDK1138) were emitted for executable/test projects that still target legacy frameworks.
    • Added SuppressTfmSupportBuildWarnings=true where newer package dependencies emitted unsupported target framework warnings for netcoreapp3.1 / net6.0.
    • Changed Tools/HashTableSize and Tools/TrimVerification/BitFaster.Trimmed to target net10.0 instead of suppressing net6.0 build warnings.
  • Where this was applied

    • Warning suppression:
      • BitFaster.Caching
      • BitFaster.Caching.UnitTests
      • BitFaster.Caching.UnitTests.Std
      • BitFaster.Caching.Benchmarks
    • Retargeted to net10.0:
      • Tools/HashTableSize
      • Tools/TrimVerification/BitFaster.Trimmed
  • Implementation shape

    • Uses per-project, per-target-framework MSBuild properties for projects that still require legacy targeting.
    • Retargets standalone tool projects to net10.0 where legacy targeting is unnecessary.
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
  <CheckEolTargetFramework>false</CheckEolTargetFramework>
  <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>
<PropertyGroup>
  <TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

Copilot AI and others added 2 commits May 5, 2026 07:09
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot change this project and BitFaster.Trimmed.csproj to target net10.0 instead of suppressing the build warning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated both tooling projects to target net10.0 in 06c3f09.

Agent-Logs-Url: https://github.com/bitfaster/BitFaster.Caching/sessions/eba74dbf-ac54-4703-8dbb-60eb3f2a3c1a

Co-authored-by: bitfaster <12851828+bitfaster@users.noreply.github.com>
Copilot AI changed the title Suppress end-of-support framework build warnings for legacy target frameworks Suppress legacy target framework build warnings and retarget tool projects to net10.0 May 5, 2026
Copilot AI requested a review from bitfaster May 5, 2026 22:26
@coveralls
Copy link
Copy Markdown

coveralls commented May 5, 2026

Coverage Status

coverage: 99.21%. remained the same — copilot/suppress-build-warnings-net-versions into main

@bitfaster bitfaster marked this pull request as ready for review May 5, 2026 22:56
@bitfaster bitfaster merged commit 165a39f into main May 5, 2026
18 checks passed
@bitfaster bitfaster deleted the copilot/suppress-build-warnings-net-versions branch May 5, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants