Skip to content

Clarify TargetFramework as TFM alias and document SDK 10.0.300 multi-TFM equivalence#52883

Open
Copilot wants to merge 3 commits intomainfrom
copilot/clarify-targetframework-alias
Open

Clarify TargetFramework as TFM alias and document SDK 10.0.300 multi-TFM equivalence#52883
Copilot wants to merge 3 commits intomainfrom
copilot/clarify-targetframework-alias

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

The TargetFramework/TargetFrameworks MSBuild property docs didn't explain that these values are aliases the SDK translates into canonical moniker properties, nor the SDK 10.0.300 behavior where multiple TargetFrameworks values can resolve to the same effective framework.

Changes to msbuild-props.md

  • TargetFramework: Adds a note that the value is an alias — the .NET SDK parses it and sets TargetFrameworkMoniker, TargetFrameworkIdentifier, TargetFrameworkVersion, and (when applicable) TargetPlatformIdentifier, TargetPlatformVersion, and TargetPlatformMoniker. Notes that users can set these properties directly when using a custom alias.

  • TargetFrameworks: Adds a note that starting with .NET SDK 10.0.300, multiple values can resolve to the same effective framework — for example:

    <TargetFrameworks>net10.0-linux;net10.0-mac</TargetFrameworks>

    Both net10.0-linux and net10.0-mac resolve to net10.0.


Internal previews

📄 File 🔗 Preview link
docs/core/project-sdk/msbuild-props.md MSBuild reference for .NET SDK projects

Copilot AI changed the title [WIP] Clarify that TargetFramework is an alias for TargetFrameworkMoniker Clarify TargetFramework as TFM alias and document SDK 10.0.300 multi-TFM equivalence Apr 6, 2026
Copilot AI requested a review from gewarren April 6, 2026 21:38
@gewarren gewarren marked this pull request as ready for review April 7, 2026 18:45
@gewarren gewarren requested a review from a team as a code owner April 7, 2026 18:45
@gewarren gewarren requested review from Copilot and nkolev92 April 7, 2026 18:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the .NET SDK MSBuild property reference to clarify how TargetFramework/TargetFrameworks values are interpreted, including noting that the SDK parses TFMs into other derived MSBuild properties, and documenting a .NET SDK 10.0.300 multi-targeting equivalence behavior.

Changes:

  • Added a note under TargetFramework explaining that the SDK parses the value and populates related MSBuild properties.
  • Added a note under TargetFrameworks about .NET SDK 10.0.300 allowing multiple entries that resolve to the same effective framework.

```

> [!NOTE]
> Starting with .NET SDK 10.0.300, multiple values can resolve to the same effective framework. For example, `<TargetFrameworks>linux;mac</TargetFrameworks>` is valid where both aliases resolve to `net10.0` as the target framework.
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The example <TargetFrameworks>linux;mac</TargetFrameworks> uses values that aren’t listed as supported TFMs in docs/standard/frameworks.md (for example, the OS-specific form is net10.0-macos, not mac, and there’s no linux TFM). As written, the note is likely to confuse readers and suggests an invalid configuration. Please update the example and wording to use supported TFM forms (and make sure it matches the scenario you intend to document about multiple entries resolving to the same effective target framework).

Suggested change
> Starting with .NET SDK 10.0.300, multiple values can resolve to the same effective framework. For example, `<TargetFrameworks>linux;mac</TargetFrameworks>` is valid where both aliases resolve to `net10.0` as the target framework.
> Starting with .NET SDK 10.0.300, multiple values can resolve to the same effective target framework. For example, `<TargetFrameworks>net10.0-windows;net10.0-windows7.0</TargetFrameworks>` is valid because both entries resolve to the same effective target framework.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify that TargetFramework is an alias for the canonical TargetFrameworkMoniker in MSBuild property docs

3 participants