Make Permissions API testable - #35987
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35987Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35987" |
Multi-Model Review — PR #35987Verdict: NEEDS_DISCUSSION 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
left a comment
There was a problem hiding this comment.
Expert Review — 1 findings
See inline comments for details.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 1 findings
See inline comments for details.
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 1 findings
See inline comments for details.
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 1 findings
See inline comments for details.
MauiBot
left a comment
There was a problem hiding this comment.
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.
🚀 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.cssrc/Essentials/src/PublicAPI/net-android/PublicAPI.Unshipped.txtsrc/Essentials/src/PublicAPI/net-ios/PublicAPI.Unshipped.txtsrc/Essentials/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txtsrc/Essentials/src/PublicAPI/net-tizen/PublicAPI.Unshipped.txtsrc/Essentials/src/PublicAPI/net-windows/PublicAPI.Unshipped.txtsrc/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txtsrc/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
IPermissionsand routes staticPermissionsmethods throughPermissions.Current, matching existing EssentialsCurrentsingleton 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-6and matching target-specific files use leading~prefixes for nullable-enabledIPermissionsmethods andPermissions.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, andShouldShowRationalecalls now route throughPermissions.Current. - Startup impact: No direct startup impact; lazy initialization occurs on first permission API use.
- Static/shared state: Yes,
currentImplementationis static. This follows existing Essentials patterns, and the new test resets it infinally.
CI Status
- Required-check result:
gh pr checks --requiredcould not run becauseghis 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, andnetstandard
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.Currentlazily createsPermissionsImplementation, preserving previousnew TPermission()behavior. - Reset after tests: the unit test uses
finallyto callPermissions.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.
kubaflo
left a comment
There was a problem hiding this comment.
Test failures seems related
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests Failure Analysis
Test Failure Review: Likely unrelated - click to expandOverall verdict: Likely unrelated The only failing check is
Recommended actionTreat 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
|
|
🚨 API change(s) detected @davidortinau FYI |
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>
* [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] .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>
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
IPermissionsabstraction andPermissions.Currentso the static permissions API can route through a replaceable implementation for testing.Changes
IPermissionsfor checking, requesting, and rationale checks.Permissionsstatic methods throughPermissions.Current.