Skip to content

Document async options validation sync access breaking change - #55901

Open
gewarren with Copilot wants to merge 3 commits into
mainfrom
copilot/breaking-change-sync-async-validation
Open

Document async options validation sync access breaking change#55901
gewarren with Copilot wants to merge 3 commits into
mainfrom
copilot/breaking-change-sync-async-validation

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

.NET 11 RC 1 changes async options validation so synchronous access now fails fast instead of returning an unvalidated options instance. Preview adopters of IAsyncValidateOptions<TOptions> might also need source changes because the interface now derives from IValidateOptions<TOptions>.

  • Breaking-change article

    • Added a .NET 11 Extensions compatibility article for the new synchronous access behavior.
    • Covers previous behavior, new behavior, compatibility impact, rationale, recommended migration, and affected APIs.
  • Navigation

    • Added the article to the .NET 11 compatibility index.
    • Added the article to the compatibility TOC.
services.AddOptions<MyOptions>()
    .Configure(o => o.Value = 42)
    .ValidateAsync(o => Task.FromResult(o.Value > 0), "Value must be positive.")
    .ValidateOnStart();

await host.StartAsync();

Internal previews

File Preview link
docs/core/compatibility/11.md Learn preview
docs/core/compatibility/extensions/11/async-options-validation-sync-access.md Learn preview
docs/core/compatibility/toc.yml Learn preview

Build report

Copilot AI lite review requested due to automatic review settings September 8, 2026 14:41

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 wasn't able to review any files in this pull request.


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix synchronous access of async-validated options to throw exception Document async options validation sync access breaking change Sep 8, 2026
Copilot AI requested a review from gewarren September 8, 2026 14:46
@gewarren
gewarren marked this pull request as ready for review September 9, 2026 20:28
@gewarren
gewarren requested a review from a team as a code owner September 9, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Breaking change]: Synchronous access of async-validated options now throws instead of skipping validation

3 participants