Skip to content

cross-platform-targeting: remove Xamarin/UWP-era graphics, modernize content#52995

Open
Copilot wants to merge 4 commits intomainfrom
copilot/update-freshness-graphic-xamarin
Open

cross-platform-targeting: remove Xamarin/UWP-era graphics, modernize content#52995
Copilot wants to merge 4 commits intomainfrom
copilot/update-freshness-graphic-xamarin

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

The article contained two diagrams showing a pre-.NET-5 ecosystem (Xamarin, .NET Core, UWP, netcoreapp2.0) that no longer reflect current .NET. All UWP references in prose and code were also stale.

Changes

  • Deleted both outdated images (platforms-netstandard.png, nuget-package-multiple-assemblies.png)
  • Replaced the NuGet multi-targeting diagram with prose describing the netstandard2.0/net8.0 assembly selection behavior
  • Code example: WINDOWS_UWPNET8_0_WINDOWS (a TFM-based preprocessor symbol defined for the net8.0-windows target)
// Before
#elif WINDOWS_UWP
    return CallUwpApi();

// After
#elif NET8_0_WINDOWS
    return CallWindowsApi();
  • Prose: "ahead-of-time compilation on iOS or UWP" → "iOS or Android"; "UWP control toolkit" → "WinUI control toolkit"
  • Updated ms.date

Internal previews

📄 File 🔗 Preview link
docs/standard/library-guidance/cross-platform-targeting.md docs/standard/library-guidance/cross-platform-targeting

Internal previews

📄 File 🔗 Preview link
docs/standard/library-guidance/cross-platform-targeting.md docs/standard/library-guidance/cross-platform-targeting

Copilot AI linked an issue Apr 13, 2026 that may be closed by this pull request
@dotnet-policy-service dotnet-policy-service bot added the okr-freshness OKR: Freshness of content label Apr 13, 2026
…ze content

Agent-Logs-Url: https://github.com/dotnet/docs/sessions/71bd78c1-5b1a-4904-a61e-ddd321aabd31

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot AI changed the title [WIP] Update freshness of article with Xamarin graphic cross-platform-targeting: remove Xamarin/UWP-era graphics, modernize content Apr 13, 2026
Copilot AI requested a review from gewarren April 13, 2026 21:22
@gewarren gewarren marked this pull request as ready for review April 15, 2026 01:01
@gewarren gewarren requested review from a team and JamesNK as code owners April 15, 2026 01:01
Copilot AI review requested due to automatic review settings April 15, 2026 01:01
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 modernizes the cross-platform targeting guidance by removing legacy Xamarin/UWP-era diagrams and updating the accompanying prose and sample code to reflect current .NET multi-targeting and Windows platform targeting.

Changes:

  • Removed two outdated ecosystem/packaging diagrams from the article.
  • Replaced the NuGet multi-targeting diagram with prose describing netstandard2.0 vs net8.0 asset selection.
  • Updated UWP references in prose and changed the sample preprocessor symbol from WINDOWS_UWP to WINDOWS.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 2 comments.

File Description
docs/standard/library-guidance/cross-platform-targeting.md Removes outdated diagram references, updates UWP-era wording, adds updated multi-targeting explanation, and updates conditional compilation example.
docs/standard/library-guidance/media/cross-platform-targeting/platforms-netstandard.png Deletes an outdated pre-.NET 5 ecosystem diagram.
docs/standard/library-guidance/media/cross-platform-targeting/nuget-package-multiple-assemblies.png Deletes an outdated NuGet multi-targeting diagram.

Comment on lines 94 to 95
#if NET462 || WINDOWS
return true;
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

Same issue as above: WINDOWS is only defined for OS-specific TFMs (for example, net8.0-windows). If the intent is to expose an IsSupported capability for the base net8.0 target, use a TFM symbol or a runtime OS check instead; otherwise, document that this property is only true when compiling for net*-windows.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

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.

The same clarifying comment covers both GetCoordinatesAsync and IsSupported, since it's placed at the class level. Addressed in commit b979b9a.

Comment on lines +81 to +82
#elif WINDOWS
return CallWindowsApi();
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

WINDOWS is a platform symbol that’s only defined when you target an OS-specific TFM (for example, net8.0-windows). As written, this conditional won’t compile into the Windows-specific branch for consumers targeting the base net8.0 TFM. Consider switching to a TFM symbol (for example, NET8_0_WINDOWS) or clarifying in the surrounding guidance that the library must target net*-windows for this branch to apply.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

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.

Added a comment to the code example clarifying that WINDOWS is only defined when targeting an OS-specific TFM (for example, net8.0-windows). Addressed in commit b979b9a.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@copilot Can you remove the code comment and use a TFM symbol instead?

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.

Removed the comment and replaced WINDOWS with NET8_0_WINDOWS in both #elif directives. Addressed in commit 0b221cb.

…e example

Agent-Logs-Url: https://github.com/dotnet/docs/sessions/1d3c4398-c429-4805-b9a9-fd0557258836

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update freshness - e.g. graphic showing Xamarin

3 participants