Skip to content

[Windows] Mark MauiWinUIApplication properties obsolete - #37957

Merged
kubaflo merged 3 commits into
inflight/currentfrom
jfversluis-resolve-overdue-obsoletion-todos
Aug 28, 2026
Merged

kubaflo merged 3 commits into
inflight/currentfrom
jfversluis-resolve-overdue-obsoletion-todos

Conversation

@jfversluis

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Marks MauiWinUIApplication.Services and MauiWinUIApplication.Application obsolete with actionable guidance to use IPlatformApplication.Current instead. This aligns Windows with the existing Android, iOS/MacCatalyst, and Tizen API surface and removes the overdue .NET 9 TODOs.

Rationale

PR #16803 moved framework internals away from concrete native application hosts to support embedding scenarios and originally deprecated these properties. PR #17667 deferred the Windows annotations because the WinUI XAML generator surfaced obsolete warnings from generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property accesses in #pragma warning disable 0618, so default projects no longer receive those warnings. Handwritten consumers still receive the intended migration warning.

No PublicAPI baseline update is required because the property signatures are unchanged and obsolete attributes are not represented by the current baseline format.

Validation

  • Built Core.csproj for net10.0-windows10.0.19041.0
  • Built Core.csproj for net10.0-windows10.0.20348.0
  • Rebuilt the Windows Sandbox app and confirmed generated accessors produce no CS0618 or RS0030 warnings

PureWeen and others added 3 commits August 27, 2026 23:46
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Updates the pinned `@microsoft/vally-cli` version used by skill
validation and live soak workflows from 0.12.0 to the latest stable
release, 0.14.0.

Also updates direct lint command examples and makes eval-spec comments
version-neutral where the described scoring behavior remains unchanged.

## Validation

- Installed Vally 0.14.0 through `.github/scripts/SetupVallyRuntime.sh`
- Strict-linted all 16 Vally evaluation specifications with Vally 0.14.0

Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9e73594e-38bc-4937-80c8-cc054aa890d2
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the `IlcTreatWarningsAsErrors=false` workaround and its TODO
from the Apple NativeAOT simulator integration test.

The linked tracking issue, #19397, was closed after all template
trimming warnings were resolved. The dedicated
`AOTTemplateTest.PublishNativeAOT` suite also maintains an empty
expected-warning baseline for Apple NativeAOT builds, so the simulator
run should enforce the default ILC warning policy again.

## Validation

- The exact `AppleTemplateTests.RunOniOS_MauiNativeAOT` test compiled
and started on Windows, but Windows could not complete the Apple ILC
phase because the iOS-simulator NativeAOT runtime pack was unavailable
(`MSB3030` for `System.Runtime.InteropServices.RuntimeInformation.dll`).
- The Windows `AOTTemplateTest.PublishNativeAOT(... win-arm64)` proxy
passed, including its assertion that the complete NativeAOT binlog
warning list is empty.

Apple-specific ILC/codegen and simulator execution require the macOS CI
lanes and will be monitored on this draft PR.

Copilot-Session: 37f90cb9-27a1-41b7-b954-95bbbcc9e81e

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 28, 2026 14:17
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37957

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37957"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events platform/windows labels Aug 28, 2026

Copilot AI left a comment

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 review overview

Review tier: Lite
Findings: None

What changed in this PR

This PR aligns the Windows application host (MauiWinUIApplication) with other platforms by formally deprecating legacy accessors in favor of the cross-platform IPlatformApplication.Current pattern, supporting embedding scenarios and consistent platform abstraction.

Changes:

  • Marked MauiWinUIApplication.Services as obsolete with guidance to use IPlatformApplication.Current.Services.
  • Marked MauiWinUIApplication.Application as obsolete with guidance to use IPlatformApplication.Current.Application.
  • Removed outdated TODO comments about deferring these obsoletions.
File Description
src/​Core/​src/​Platform/​Windows/​MauiWinUIApplication.cs Adds [Obsolete] annotations (matching other platforms) to legacy host properties and removes the old NET9 TODOs.

@kubaflo
kubaflo changed the base branch from main to inflight/current August 28, 2026 16:05
@kubaflo
kubaflo merged commit 75311d2 into inflight/current Aug 28, 2026
14 of 39 checks passed
@kubaflo
kubaflo deleted the jfversluis-resolve-overdue-obsoletion-todos branch August 28, 2026 16:06
@github-actions github-actions Bot added this to the .NET 10 SR11 milestone Aug 28, 2026
kubaflo added a commit that referenced this pull request Sep 2, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 3, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 6, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 7, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 8, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 9, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 11, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 15, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 18, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 21, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Marks `MauiWinUIApplication.Services` and
`MauiWinUIApplication.Application` obsolete with actionable guidance to
use `IPlatformApplication.Current` instead. This aligns Windows with the
existing Android, iOS/MacCatalyst, and Tizen API surface and removes the
overdue .NET 9 TODOs.

### Rationale

PR #16803 moved framework internals away from concrete native
application hosts to support embedding scenarios and originally
deprecated these properties. PR #17667 deferred the Windows annotations
because the WinUI XAML generator surfaced obsolete warnings from
generated accessors.

The current WinUI XAML generator now wraps generated obsolete-property
accesses in `#pragma warning disable 0618`, so default projects no
longer receive those warnings. Handwritten consumers still receive the
intended migration warning.

No `PublicAPI` baseline update is required because the property
signatures are unchanged and obsolete attributes are not represented by
the current baseline format.

### Validation

- Built `Core.csproj` for `net10.0-windows10.0.19041.0`
- Built `Core.csproj` for `net10.0-windows10.0.20348.0`
- Rebuilt the Windows Sandbox app and confirmed generated accessors
produce no `CS0618` or `RS0030` warnings

---------

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 28, 2026
@github-actions github-actions Bot modified the milestones: .NET 10 SR11, .NET 10 SR12 Oct 21, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 8ac5b3f4 Deployed Aug 28, 2026 by jfversluis via conclusion #1616
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants