Skip to content

Make Permissions API testable - #35987

Merged
jfversluis merged 3 commits into
net11.0from
jfversluis/testable-permissions-net11
Jun 24, 2026
Merged

Make Permissions API testable#35987
jfversluis merged 3 commits into
net11.0from
jfversluis/testable-permissions-net11

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

Adds an IPermissions abstraction and Permissions.Current so the static permissions API can route through a replaceable implementation for testing.

Changes

  • Adds IPermissions for checking, requesting, and rationale checks.
  • Delegates Permissions static methods through Permissions.Current.
  • Adds PublicAPI entries for the new API surface.
  • Adds unit coverage verifying the static methods use the current implementation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 18, 2026

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 -- 35987

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35987"
@github-actions github-actions Bot added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Jun 18, 2026
@kubaflo

kubaflo commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Multi-Model Review — PR #35987

Verdict: NEEDS_DISCUSSION
Confidence: medium

Model verdicts: gemini (LGTM), gpt-5.5 (NEEDS_DISCUSSION), opus-4.6 (LGTM), opus-4.8 (NEEDS_DISCUSSION)

Findings: 0 issues identified.

Multi-model review (gpt-5.5 · opus-4.8 · opus-4.6 · gemini-3.1-pro). Comments only — not a formal approval.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

Comment thread src/Essentials/src/Permissions/Permissions.shared.cs
@MauiBot MauiBot added s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Jun 18, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot added s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates and removed s/agent-fix-win AI found a better alternative fix than the PR labels Jun 18, 2026
MauiBot

This comment was marked as outdated.

kubaflo
kubaflo previously approved these changes Jun 18, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

Comment thread src/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txt Outdated
@MauiBot MauiBot added s/agent-fix-win AI found a better alternative fix than the PR and removed s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates labels Jun 19, 2026
MauiBot

This comment was marked as outdated.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 20, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

Comment thread src/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txt Outdated
@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 20, 2026
@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 20, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

Comment thread src/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txt Outdated
@MauiBot MauiBot added s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates and removed s/agent-fix-win AI found a better alternative fix than the PR labels Jun 20, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI Review Summary

@jfversluis — new AI review results are available based on this last commit: 13d5f85. To request a fresh review after new comments or commits, comment /review rerun.

Gate Failed Confidence Low Platform Android


🚀 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

🗂️ Review Sessions — click to expand
🧪 Gate — Test Before & After Fix

Gate Result: ❌ FAILED

Platform: ANDROID · Base: net11.0 · Merge base: bcb20a61

🩺 Base branch does not compile — the without-fix build failed. The gate's "does the test fail without the fix" check is unreliable here; this usually means main is broken or a merge-base file went missing. Investigate before trusting this gate.

Test Without Fix (expect FAIL) With Fix (expect PASS)
🧪 Permissions_Tests Permissions_Tests 🛠️ BUILD ERROR ❌ FAIL — 7s
🔴 Without fix — 🧪 Permissions_Tests: 🛠️ BUILD ERROR · 18s
  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 1.78 sec).
  Restored /home/vsts/work/1/s/src/Essentials/test/UnitTests/Essentials.UnitTests.csproj (in 3.43 sec).
  Restored /home/vsts/work/1/s/src/Essentials/src/Essentials.csproj (in 4.08 sec).
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14439316
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14439316
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
/home/vsts/work/1/s/src/Essentials/test/UnitTests/Permissions_Tests.cs(53,27): error CS0246: The type or namespace name 'IPermissions' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Essentials/test/UnitTests/Essentials.UnitTests.csproj]

🟢 With fix — 🧪 Permissions_Tests: FAIL ❌ · 7s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14439316
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]11.0.0-ci+azdo.14439316
/home/vsts/work/1/s/src/Essentials/src/Permissions/Permissions.shared.cs(120,4): error RS0016: Symbol 'static Microsoft.Maui.ApplicationModel.Permissions.Current.get -> Microsoft.Maui.ApplicationModel.IPermissions!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/home/vsts/work/1/s/src/Essentials/src/Essentials.csproj::TargetFramework=net11.0]
/home/vsts/work/1/s/src/Essentials/src/Permissions/Permissions.shared.cs(21,26): error RS0016: Symbol 'Microsoft.Maui.ApplicationModel.IPermissions.CheckStatusAsync<TPermission>() -> System.Threading.Tasks.Task<Microsoft.Maui.ApplicationModel.PermissionStatus>!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/home/vsts/work/1/s/src/Essentials/src/Essentials.csproj::TargetFramework=net11.0]
/home/vsts/work/1/s/src/Essentials/src/Permissions/Permissions.shared.cs(34,26): error RS0016: Symbol 'Microsoft.Maui.ApplicationModel.IPermissions.RequestAsync<TPermission>() -> System.Threading.Tasks.Task<Microsoft.Maui.ApplicationModel.PermissionStatus>!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/home/vsts/work/1/s/src/Essentials/src/Essentials.csproj::TargetFramework=net11.0]
/home/vsts/work/1/s/src/Essentials/src/Permissions/Permissions.shared.cs(43,8): error RS0036: Symbol 'Microsoft.Maui.ApplicationModel.IPermissions.ShouldShowRationale<TPermission>() -> bool' is missing nullability annotations in the declared API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/home/vsts/work/1/s/src/Essentials/src/Essentials.csproj::TargetFramework=net11.0]

⚠️ Failure Details

  • 🛠️ Permissions_Tests without fix: build failed before tests could run
    • /home/vsts/work/1/s/src/Essentials/test/UnitTests/Permissions_Tests.cs(53,27): error CS0246: The type or namespace name 'IPermissions' could not be found (are you missing a using directive or an assem...
  • Permissions_Tests FAILED with fix (should pass)
📁 Fix files reverted (8 files)
  • src/Essentials/src/Permissions/Permissions.shared.cs
  • src/Essentials/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
  • src/Essentials/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
  • src/Essentials/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
  • src/Essentials/src/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
  • src/Essentials/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt
  • src/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txt
  • src/Essentials/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt

📱 UI Tests — Essentials

Detected UI test categories: Essentials


🛫 Pre-Flight — Context & Validation

Issue: #35987 - Make Permissions API testable
PR: #35987 - Make Permissions API testable
Platforms Affected: Android and all Essentials target platforms (net, net-android, net-ios, net-maccatalyst, net-tizen, net-windows, netstandard)
Files Changed: 8 implementation/API, 1 test

Key Findings

  • PR adds IPermissions and routes static Permissions methods through Permissions.Current, matching existing Essentials Current singleton patterns.
  • Gate was already reported failed; pre-flight did not rerun gate verification.
  • PublicAPI nullable entries are still incorrect: new nullable-enabled members are recorded with leading ~ nullable-oblivious prefixes across all changed PublicAPI files.
  • Prior MauiBot inline feedback identifies the same PublicAPI/nullability issue and it remains unresolved in the checked-out PR baseline.

Code Review Summary

Verdict: NEEDS_CHANGES
Confidence: low
Errors: 1 | Warnings: 0 | Suggestions: 0

Key code review findings:

  • src/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txt:3-6 and matching target-specific files use leading ~ prefixes for nullable-enabled IPermissions methods and Permissions.Current, causing RS0016/RS0036 PublicAPI analyzer failures.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #35987 Public IPermissions plus public Permissions.Current; static methods delegate through Current ❌ FAILED (Gate) Permissions.shared.cs, 7 PublicAPI files, Permissions_Tests.cs Original PR; design is consistent with Essentials patterns but PublicAPI entries need correction

🔬 Code Review — Deep Analysis

Code Review — PR #35987

Independent Assessment

What this changes: Adds a public IPermissions abstraction plus Permissions.Current, and routes Permissions.CheckStatusAsync, RequestAsync, and ShouldShowRationale through that current implementation. The default implementation preserves previous behavior by constructing new TPermission() per call.

Inferred motivation: Make the static Permissions API consistent with other Essentials APIs that expose interface-backed Current singletons, and make permissions behavior replaceable in tests.

Reconciliation with PR Narrative

Author claims: The PR adds IPermissions, delegates static permission methods through Permissions.Current, updates PublicAPI entries, and adds unit coverage.

Agreement/disagreement: The implementation matches the intended behavioral change and the unit test verifies the new delegation path. However, the PublicAPI entries do not match the nullable-enabled API shape, and current CI/build-analysis evidence shows this causes PublicApiAnalyzer failures.

Prior Review Reconciliation

Prior ❌ Error Finding Source Status Evidence
Public API/nullability baseline entries use nullable-oblivious ~ prefixes for newly nullable-enabled IPermissions APIs MauiBot inline review / later MauiBot gate summaries ❌ Unresolved Current src/Essentials/src/PublicAPI/*/PublicAPI.Unshipped.txt entries still have ~ prefixes at lines 3-6; Build Analysis reports RS0016/RS0036 for these symbols.
Initial source file nullable-disabled concern MauiBot inline review ✅ Fixed / partially superseded Permissions.shared.cs now scopes #nullable enable around IPermissions and Permissions.Current, but the PublicAPI baseline remains wrong.

Blast Radius Assessment

  • Runs for all instances: Yes, all static Permissions.CheckStatusAsync, RequestAsync, and ShouldShowRationale calls now route through Permissions.Current.
  • Startup impact: No direct startup impact; lazy initialization occurs on first permission API use.
  • Static/shared state: Yes, currentImplementation is static. This follows existing Essentials patterns, and the new test resets it in finally.

CI Status

  • Required-check result: gh pr checks --required could not run because gh is unauthenticated.
  • Classification: PR-caused failure ❌ based on public review/check evidence: current head has PublicAPI analyzer failures, with RS0016/RS0036 errors for the new PublicAPI entries.
  • Action taken: Used public GitHub PR/review data fallback and capped verdict confidence per skill rules.

Findings

❌ Error — PublicAPI entries still use nullable-oblivious ~ prefixes

The new API is declared under #nullable enable, but all changed Essentials PublicAPI.Unshipped.txt target files still mark the new members as nullable-oblivious:

  • src/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txt:3-6
  • same entries in net-android, net-ios, net-maccatalyst, net-tizen, net-windows, and netstandard

Current entries include:

~Microsoft.Maui.ApplicationModel.IPermissions.CheckStatusAsync<TPermission>() -> ...
~Microsoft.Maui.ApplicationModel.IPermissions.RequestAsync<TPermission>() -> ...
~Microsoft.Maui.ApplicationModel.IPermissions.ShouldShowRationale<TPermission>() -> bool
~static Microsoft.Maui.ApplicationModel.Permissions.Current.get -> Microsoft.Maui.ApplicationModel.IPermissions!

Build Analysis for the current PR head reports matching PublicApiAnalyzer failures, including RS0016 for Permissions.Current.get, IPermissions.CheckStatusAsync, IPermissions.RequestAsync, and RS0036 for ShouldShowRationale. These entries should be regenerated or corrected to match the nullable-enabled signatures, removing the ~ prefixes where appropriate.

Failure-Mode Probing

  • Existing callers without a custom implementation: Permissions.Current lazily creates PermissionsImplementation, preserving previous new TPermission() behavior.
  • Reset after tests: the unit test uses finally to call Permissions.SetCurrent(null), avoiding persistent static-state contamination.
  • Public API validation: current baselines do not match the new nullable-enabled source, so builds fail before runtime behavior can be validated.

Verdict: NEEDS_CHANGES

Confidence: low per skill calibration because CI/gate is red, though the PublicAPI finding itself is high-confidence.
Summary: The code approach is consistent with Essentials singleton patterns and preserves default behavior, but the PR currently fails PublicApiAnalyzer validation. Fix the nullable PublicAPI entries across all changed target files before merge.


🛠️ Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix Internal Func<Type, BasePermission> factory seam; remove new public API ✅ Unit PASS / Android BLOCKED 9 files Simpler and avoids PublicAPI failure, but only provides internal/framework testability and does not satisfy consumer-facing abstraction goal
2 try-fix Public IPermissions plus public PermissionsImplementation; no public mutable Permissions.Current ✅ Unit PASS / Android BLOCKED 9 files Preserves consumer DI option and avoids mutable singleton, but adds more public API and diverges from existing Essentials Current pattern
3 try-fix Resolve IPermissions from IPlatformApplication.Current.Services with internal fallback ❌ Compile FAIL 9 files Not viable: Essentials does not reference Microsoft.Maui.IPlatformApplication; adding that dependency is a layering risk
PR PR #35987 Public IPermissions plus public Permissions.Current; static methods delegate through Current ❌ FAILED (Gate) 9 files Original PR; likely best design after correcting PublicAPI nullable entries

Cross-Pollination

Model Round New Ideas? Details
maui-expert-reviewer 2 Yes Suggested resolving IPermissions from MAUI DI via IPlatformApplication.Current?.Services with internal fallback
maui-expert-reviewer 3 No NO NEW IDEAS: Current PR design seems best; fix the PublicAPI nullable ~ entries rather than introduce a weaker or riskier seam.

Exhausted: Yes
Selected Fix: PR's fix with PublicAPI correction — The independent alternatives either reduce the product value, add more public surface/diverge from Essentials conventions, or fail layering/compile validation. The current PR approach is consistent with existing Essentials APIs; its blocking issue is the incorrect nullable PublicAPI entries.


📝 Recommended PR Title & Description

Assessment: ✏️ Recommend updating - the current description is accurate, but the title should identify the Essentials Permissions component more clearly.

Recommended title

Essentials Permissions: Add testable permissions abstraction

Recommended description

### Description
Adds an `IPermissions` abstraction and `Permissions.Current` so the static permissions API can route through a replaceable implementation for testing.

### Changes
- Adds `IPermissions` for checking, requesting, and rationale checks.
- Delegates `Permissions` static methods through `Permissions.Current`.
- Adds PublicAPI entries for the new API surface.
- Adds unit coverage verifying the static methods use the current implementation.

🏁 Report — Final Recommendation

Comparative Analysis - PR #35987

Candidates

Rank Candidate Result Assessment
1 pr-plus-reviewer Focused unit PASS Keeps the PR's intended public IPermissions + Permissions.Current design and applies the expert reviewer's PublicAPI nullability correction. This resolves the known PR-caused analyzer blocker while preserving the product value and existing Essentials Current convention.
2 try-fix-2 Unit PASS / Android BLOCKED Preserves a public abstraction and avoids public mutable singleton state, but adds a public PermissionsImplementation, diverges from existing Essentials static API patterns, and does not let existing static-call consumers swap the implementation.
3 try-fix-1 Unit PASS / Android BLOCKED Technically simple and avoids new public API, but it is only an internal factory seam. It does not satisfy the consumer-facing testability goal implied by adding IPermissions.
4 pr Gate FAILED The raw PR has the preferred design, but failed the gate because PublicAPI entries used nullable-oblivious ~ prefixes for nullable-enabled APIs, causing RS0016/RS0036 analyzer failures. Per ranking rules, failed candidates are lower than passing candidates.
5 try-fix-3 Compile FAIL Not viable: resolving IPermissions via Microsoft.Maui.IPlatformApplication.Current.Services fails in Essentials due to layering/type availability and would add an inappropriate dependency risk.

Winning candidate

Winner: pr-plus-reviewer

pr-plus-reviewer is the best candidate because it keeps the raw PR's public API model, which is consistent with existing Essentials Current patterns, while applying the only actionable expert review fix: correcting nullable PublicAPI entries across all target-specific files. The alternatives that passed unit tests either reduce the API's consumer-facing value or add a less conventional public implementation type, while the failed candidates are ranked lower as required.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 20, 2026
@kubaflo
kubaflo enabled auto-merge (squash) June 23, 2026 14:07
@PureWeen
PureWeen disabled auto-merge June 23, 2026 14:19

@kubaflo kubaflo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Test failures seems related

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jfversluis

Copy link
Copy Markdown
Member Author

Tests Failure Analysis

@jfversluis — test-failure review results are available based on commit dca3540.
To request a fresh review after new comments, commits, or CI runs, comment /review tests.

Overall Likely unrelated Failures 1 Platform macOS

Test Failure Review: Likely unrelated - click to expand

Overall verdict: Likely unrelated

The only failing check is maui-pr (Run Integration Tests AOT macOS). It fails because AOT template tests detect an unexpected linker warning file for UIKit.UIGestureRecognizer.Callback<T>.Activated(T), and the same signature is present on multiple recent net11.0 base branch maui-pr builds.

Failure Verdict Evidence
maui-pr (Run Integration Tests AOT macOS) / AOTTemplateTest.PublishNativeAOT* Likely unrelated PR changes are limited to Essentials Permissions/PublicAPI/test files. The failed AOT macOS log for build 1478909 reports Unexpected warning files detected for obj/Release/net11.0-ios/.../linker-cache/apply-preserve-attribute.xml and warning IL2009: Could not find method 'System.Void Activated(T)' on type 'UIKit.UIGestureRecognizer.Callback1'. Recent net11.0` base builds 1478864, 1477477, 1476359, 1476200, and 1476157 have the same AOT macOS failure signature.

Recommended action

Treat this CI failure as unrelated to this PR. No PR code change is recommended for the AOT warning-baseline failure; rerun after the base branch AOT warning baseline issue is resolved or rerun if infrastructure/build owners request it.

Evidence details
  • Current PR build: maui-pr build 1478909.
  • Failed job: Run Integration Tests AOT macOS.
  • Failing test family: Microsoft.Maui.IntegrationTests.AOTTemplateTest.PublishNativeAOT*.
  • Error message: Unexpected warning files detected! Unexpected warning file paths are: .../linker-cache/apply-preserve-attribute.xml.
  • Build output warning: IL2009: Could not find method 'System.Void Activated(T)' on type 'UIKit.UIGestureRecognizer.Callback1'`.
  • Base branch comparison: recent refs/heads/net11.0 maui-pr builds 1478864, 1477477, 1476359, 1476200, and 1476157 also contain Unexpected warning files detected, UIGestureRecognizer.Callback, and apply-preserve-attribute.xml in the AOT macOS failure log.
  • Local validation for this PR's change passed: dotnet build src/Essentials/src/Essentials.csproj --no-restore -f net11.0 and the targeted Permissions_Tests.
@jfversluis
jfversluis merged commit 0e6feef into net11.0 Jun 24, 2026
31 of 34 checks passed
@jfversluis
jfversluis deleted the jfversluis/testable-permissions-net11 branch June 24, 2026 13:05
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

🚨 API change(s) detected @davidortinau FYI

@dotnet dotnet deleted a comment from dotnet-policy-service Bot Jun 24, 2026
@github-actions github-actions Bot added this to the .NET 11.0-preview6 milestone Jun 24, 2026
davidortinau added a commit to dotnet/core that referenced this pull request Jul 10, 2026
Incorporates jfversluis review feedback on #10467:
- Android MediaPicker result recovery APIs (dotnet/maui#35455)
- HybridWebView Android message-source filtering (dotnet/maui#35717)
- XAML C# expression source generator CS1061 fix (dotnet/maui#35922)
- Testable permissions via IPermissions/Permissions.Current (dotnet/maui#35987)
- XA0149 warning for legacy __AndroidEnvironment__ resources (dotnet/android#11700)
- Skip library proguard.txt with disallowed R8 global options (dotnet/android#11709)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
davidortinau added a commit to dotnet/core that referenced this pull request Jul 10, 2026
* [release-notes] .NET MAUI in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Draft .NET MAUI and friends notes for .NET 11 Preview 6

Combined highlights for .NET MAUI, .NET for Android, and .NET for iOS,
Mac Catalyst, macOS, and tvOS: CollectionView2 on Windows, handler-based
Shell on Android, Compatibility package removal, AOT-safe HybridWebView,
Geolocation minimum-distance filter, a reliability wave, the
AndroidMessageHandler HTTP-contract work, and the Apple platform toolchain
and NSUrlSessionHandler updates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Add Preview 6 items from MAUI maintainer review

Incorporates jfversluis review feedback on #10467:
- Android MediaPicker result recovery APIs (dotnet/maui#35455)
- HybridWebView Android message-source filtering (dotnet/maui#35717)
- XAML C# expression source generator CS1061 fix (dotnet/maui#35922)
- Testable permissions via IPermissions/Permissions.Current (dotnet/maui#35987)
- XA0149 warning for legacy __AndroidEnvironment__ resources (dotnet/android#11700)
- Skip library proguard.txt with disallowed R8 global options (dotnet/android#11709)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: David Ortinau <david.ortinau@microsoft.com>
rbhanda added a commit to dotnet/core that referenced this pull request Jul 14, 2026
* [release-notes] .NET 11 Preview 6 base metadata

changes.json, features.json, build-metadata.json, and README for the
.NET 11 Preview 6 milestone (VMR base v11.0.0-preview.5.26302.115 ->
head release/11.0.1xx-preview6).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* [release-notes] C# in .NET 11 Preview 6 (#10460)

* [release-notes] C# in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update release-notes/11.0/preview/preview6/csharp.md

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>

* [release-notes] MSBuild in .NET 11 Preview 6 (#10463)

* [release-notes] MSBuild in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add bug-fix note for architecture-agnostic Runtime=NET task host handshake (dotnet/msbuild#13890)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Remove HTML comments from Preview 6 MSBuild release notes

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Chet Husk <chusk3@gmail.com>

* [release-notes] NuGet in .NET 11 Preview 6 (#10464)

* [release-notes] NuGet in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix STJ feature-flag env var value and remove VS reference

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Chet Husk <chusk3@gmail.com>

* [release-notes] .NET SDK in .NET 11 Preview 6 (#10459)

* [release-notes] .NET SDK in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Clarify NativeAOT CLI updates in preview6/sdk.md

Updated the NativeAOT CLI section to clarify the unification of managed and NativeAOT parsers, and removed filtered content related to internal changes.

* Add live running-tests display to dotnet test notes

Document the in-flight test progress panel (dotnet/sdk#54486) and fix
pre-existing trailing-space lint errors in the NativeAOT section.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Chet Husk <baronfel@users.noreply.github.com>
Co-authored-by: Chet Husk <chusk3@gmail.com>

* [release-notes] Windows Forms in .NET 11 Preview 6 (#10465)

* [release-notes] Windows Forms in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Revise Windows Forms release notes for Preview 6

Updated release notes for .NET 11 Preview 6 to include bug fixes and improvements for various Windows Forms components.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com>

* [release-notes] .NET MAUI in .NET 11 Preview 6 (#10467)

* [release-notes] .NET MAUI in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Draft .NET MAUI and friends notes for .NET 11 Preview 6

Combined highlights for .NET MAUI, .NET for Android, and .NET for iOS,
Mac Catalyst, macOS, and tvOS: CollectionView2 on Windows, handler-based
Shell on Android, Compatibility package removal, AOT-safe HybridWebView,
Geolocation minimum-distance filter, a reliability wave, the
AndroidMessageHandler HTTP-contract work, and the Apple platform toolchain
and NSUrlSessionHandler updates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Add Preview 6 items from MAUI maintainer review

Incorporates jfversluis review feedback on #10467:
- Android MediaPicker result recovery APIs (dotnet/maui#35455)
- HybridWebView Android message-source filtering (dotnet/maui#35717)
- XAML C# expression source generator CS1061 fix (dotnet/maui#35922)
- Testable permissions via IPermissions/Permissions.Current (dotnet/maui#35987)
- XA0149 warning for legacy __AndroidEnvironment__ resources (dotnet/android#11700)
- Skip library proguard.txt with disallowed R8 global options (dotnet/android#11709)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: David Ortinau <david.ortinau@microsoft.com>

* [release-notes] EF Core in .NET 11 Preview 6 (#10462)

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>

* [release-notes] F# in .NET 11 Preview 6 (#10461)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* [release-notes] Containers in .NET 11 Preview 6 (#10468)

* [release-notes] Containers in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update release notes

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Logan Bussell <loganbussell@microsoft.com>

* [release-notes] .NET Libraries in .NET 11 Preview 6 (#10457)

* [release-notes] .NET Libraries in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix async DataAnnotations sample after testing on the Preview 6 SDK

AsyncValidationAttribute is overridden via the protected IsValidAsync
(and IsValid) members, not GetValidationResultAsync (which is the public
method the framework calls and is not virtual). Verified the corrected
sample compiles and runs against the Preview 6 build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Verify Preview 6 library samples and fix inaccuracies

- Stream adapters: read from the read-only stream via StreamContent/PostAsync instead of copying HttpContent into it

- Cross-lane vectors: replace nonexistent Concat with ConcatLowerLower/LowerUpper/UpperLower/UpperUpper and drop preexisting Shuffle/ShuffleNative

- Async validation: swap the unique-username example for a VAT registry lookup, layer StringLength and RegularExpression sync rules with the async rule, and add a server-side validation note

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>

* [release-notes] ASP.NET Core in .NET 11 Preview 6 (#10456)

* [release-notes] WPF in .NET 11 Preview 6 (#10466)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Throw InvalidOperationException for sync validation of async validator

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Apply late review suggestions from #10456 to the ASP.NET Core notes

- OpenAPI unions: correct the third-party generator claim (ApiExplorer does not
  detect unions via JsonTypeInfoKind.Union; Swashbuckle/NSwag don't yet
  recognize unions). Per @DeagleGross review on #10456.
- Blazor Virtualize: note that a user scroll during ScrollToIndexAsync wins.
  Per @ilonatommy review on #10456.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add P6 Blazor items to align with docs (dotnet/AspNetCore.Docs#37322)

- CSRF: note that Blazor Web App templates no longer call app.UseAntiforgery().
- Bug fixes/Blazor: Virtualize is now CSP-compliant (#66680); session cookie is
  issued before streaming SSR for [SupplyParameterFromSession]/TempData (#66832).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Document 'Configure Blazor client behavior from the server' as a P6 feature

WithBrowserOptions flows client-side Blazor.start configuration from the server
in C# (log level, Server reconnection, SSR DOM preservation, WASM environment),
serialized to the client across Server/WebAssembly/Auto render modes. Introduced
in Preview 4 (server-to-browser config via DOM comment) and reshaped in Preview 6
(dotnet/aspnetcore#67337, proposal #66393). Includes the reshape/rename migration
for earlier adopters. Sample build-verified on 11.0.100-preview.6.26359.118.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Correct Virtualize CSP note: data-blazor-virtualize-reserved-height

Reviewing dotnet/AspNetCore.Docs#37322 surfaced that the attribute is
data-blazor-virtualize-reserved-height (only the server-computed spacer height),
not the generic data-blazor-style. Verified in the P6 source (Virtualize.cs /
Virtualize.ts). @ilonatommy corrected the same wording on the docs PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* [release-notes] .NET Runtime in .NET 11 Preview 6 (#10458)

* [release-notes] .NET Runtime in .NET 11 Preview 6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Enrich Preview 6 runtime notes with additional verified features

Fold verified .NET 11 Preview 6 runtime changes into runtime.md
(JIT improvements, in-process crash logging, NativeAOT interface
dispatch, SIMD lane APIs, and an expanded bug-fix list), and rebuild
the TOC to match the current sections.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ade796bb-8052-4946-b204-a88518267e77

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Rich Lander <2608468+richlander@users.noreply.github.com>

* fix markdown lint in preview6 containers note

Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: Chet Husk <chusk3@gmail.com>
Co-authored-by: Chet Husk <baronfel@users.noreply.github.com>
Co-authored-by: Klaus Löffelmann <9663150+KlausLoeffelmann@users.noreply.github.com>
Co-authored-by: David Ortinau <david.ortinau@microsoft.com>
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Co-authored-by: Logan Bussell <loganbussell@microsoft.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Rich Lander <2608468+richlander@users.noreply.github.com>
Co-authored-by: Rahul Bhandari <rbhanda@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) t/breaking 💥

3 participants