Skip to content

Drop net9.0: target net10.0 only (single TargetFramework) #267

Description

@credfeto

Summary

This repository has one or more projects multi-targeting net9.0;net10.0. We're moving to support .NET 10 only, so drop net9.0 and target net10.0 exclusively.

Change

For every .csproj currently containing:

<TargetFrameworks>net9.0;net10.0</TargetFrameworks>

replace the element with a single TargetFramework:

<TargetFramework>net10.0</TargetFramework>

Treat this as a repository-wide rule (grep for the pattern above at the start of work), not a fixed file list: the set below reflects a scan of main at the time this issue was raised and may have drifted.

Known affected projects (at time of writing)

  • src/Credfeto.DotNet.Repo.Formatter.Tests/Credfeto.DotNet.Repo.Formatter.Tests.csproj
  • src/Credfeto.DotNet.Repo.Formatter/Credfeto.DotNet.Repo.Formatter.csproj
  • src/Credfeto.DotNet.Repo.Tools.Build.Interfaces/Credfeto.DotNet.Repo.Tools.Build.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tools.Build.Tests/Credfeto.DotNet.Repo.Tools.Build.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Build/Credfeto.DotNet.Repo.Tools.Build.csproj
  • src/Credfeto.DotNet.Repo.Tools.CleanUp.Benchmarks.Tests/Credfeto.DotNet.Repo.Tools.CleanUp.Benchmarks.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.CleanUp.Interfaces/Credfeto.DotNet.Repo.Tools.CleanUp.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tools.CleanUp.Tests/Credfeto.DotNet.Repo.Tools.CleanUp.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.CleanUp/Credfeto.DotNet.Repo.Tools.CleanUp.csproj
  • src/Credfeto.DotNet.Repo.Tools.Cmd.Tests/Credfeto.DotNet.Repo.Tools.Cmd.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Cmd/Credfeto.DotNet.Repo.Tools.Cmd.csproj
  • src/Credfeto.DotNet.Repo.Tools.Dependencies.Interfaces/Credfeto.DotNet.Repo.Tools.Dependencies.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tools.Dependencies.Tests/Credfeto.DotNet.Repo.Tools.Dependencies.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Dependencies/Credfeto.DotNet.Repo.Tools.Dependencies.csproj
  • src/Credfeto.DotNet.Repo.Tools.DotNet.Interfaces/Credfeto.DotNet.Repo.Tools.DotNet.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tools.DotNet.Tests/Credfeto.DotNet.Repo.Tools.DotNet.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.DotNet/Credfeto.DotNet.Repo.Tools.DotNet.csproj
  • src/Credfeto.DotNet.Repo.Tools.Extensions/Credfeto.DotNet.Repo.Tools.Extensions.csproj
  • src/Credfeto.DotNet.Repo.Tools.Git.Integration.Tests/Credfeto.DotNet.Repo.Tools.Git.Integration.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Git.Interfaces/Credfeto.DotNet.Repo.Tools.Git.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tools.Git.Tests/Credfeto.DotNet.Repo.Tools.Git.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Git/Credfeto.DotNet.Repo.Tools.Git.csproj
  • src/Credfeto.DotNet.Repo.Tools.Models/Credfeto.DotNet.Repo.Tools.Models.csproj
  • src/Credfeto.DotNet.Repo.Tools.Packages.Interfaces.Tests/Credfeto.DotNet.Repo.Tools.Packages.Interfaces.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Packages.Interfaces/Credfeto.DotNet.Repo.Tools.Packages.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tools.Packages.Tests/Credfeto.DotNet.Repo.Tools.Packages.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Packages/Credfeto.DotNet.Repo.Tools.Packages.csproj
  • src/Credfeto.DotNet.Repo.Tools.Release.Interfaces.Tests/Credfeto.DotNet.Repo.Tools.Release.Interfaces.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Release.Interfaces/Credfeto.DotNet.Repo.Tools.Release.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tools.Release.Tests/Credfeto.DotNet.Repo.Tools.Release.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.Release/Credfeto.DotNet.Repo.Tools.Release.csproj
  • src/Credfeto.DotNet.Repo.Tools.TemplateUpdate.Interfaces/Credfeto.DotNet.Repo.Tools.TemplateUpdate.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tools.TemplateUpdate.Tests/Credfeto.DotNet.Repo.Tools.TemplateUpdate.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tools.TemplateUpdate/Credfeto.DotNet.Repo.Tools.TemplateUpdate.csproj
  • src/Credfeto.DotNet.Repo.Tracking.Interfaces/Credfeto.DotNet.Repo.Tracking.Interfaces.csproj
  • src/Credfeto.DotNet.Repo.Tracking.Tests/Credfeto.DotNet.Repo.Tracking.Tests.csproj
  • src/Credfeto.DotNet.Repo.Tracking/Credfeto.DotNet.Repo.Tracking.csproj

Also check

  • TFM-specific conditions that reference net9.0 directly (e.g. Condition="'$(TargetFramework)' == 'net9.0'", #if NET9_0 (not _OR_GREATER), or PackageReference/ItemGroup blocks scoped to net9.0) become dead code once net9.0 is no longer a target; remove them per the Conditional Compilation and Dead Code rule in dotnet.instructions.md.
  • #if NET9_0_OR_GREATER-style guards remain valid (net10.0 still satisfies _OR_GREATER); no action needed there.
  • global.json and any CI workflow files pinning a net9-specific SDK version.
  • Shared Directory.Build.props/Directory.Build.targets or solution-level MSBuild files referencing net9.0.
  • Run dotnet buildcheck, dotnet build, and dotnet test after the change; fix anything that surfaces.

Origin

Raised directly by a human instruction (not an ad-hoc/blocked AI-initiated issue): "for all the writable credfeto funfair-tech repos that have dotnet projects that have a net9.0;net10.0 in main; switch the project to net10 so we just support dotnet 10."

Metadata

Metadata

Assignees

Labels

AI-WorkWork for an AI AgentUrgentUrgent Priority

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions