Update cross-platform targeting guidance to prioritize modern .NET over netstandard2.0 #48052
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the cross-platform targeting guidance to reflect current best practices by recommending modern .NET versions (net6.0+) as the starting point for new libraries instead of netstandard2.0.
Background
The current documentation suggests starting with
netstandard2.0
as the default for cross-platform targeting. However, as noted in the issue, this advice is outdated and may inadvertently:Changes Made
Primary recommendation updated: Changed from "DO start with including a
netstandard2.0
target" to "DO start with including anet6.0
target or later for new libraries."Added conceptual clarity: Introduced a distinction between:
Repositioned netstandard2.0: Changed to "CONSIDER including a
netstandard2.0
target if you need broad compatibility or .NET Framework support" - positioning it as a specific-use case rather than the default.Updated examples: The multi-targeting project file example now shows
net6.0;netstandard2.0
instead ofnetstandard2.0;net462
to reflect modern practices.Impact
The updated guidance encourages developers to:
This aligns with the ecosystem-wide push toward modern .NET while still providing clear guidance on when older targets are appropriate.
Fixes #47458.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews