Microsoft’s latest ASP.NET Core 10 Preview 2 release from March 18th introduces targeted improvements to Blazor’s navigation behavior, OpenAPI documentation generation, and developer tooling, addressing community feedback. The update focuses on small enhancements rather than new features, refining existing capabilities ahead of .NET 10’s stable release later this year.
The most relevant change in Preview 2 is the revamping of the navigation system in Blazor to eliminate jarring user experience issues. When using NavigateTo
for same-page navigations (e.g., query string updates), the browser will no longer forcibly scroll to the top. In previous versions, this was a behavior that developers had to work around manually.
The NavLink
component also sees improvements, now ignoring query strings and fragments by default when matching using NavLinkMatch.All
. This means a link will be active even if the query strings or fragments in the URL change. An AppContext
switch reverts to the legacy behavior for teams needing backwards compatibility. For custom matching behaviour, NavLink
now exposes an overridable ShouldMatch
method.
Blazor’s reconnection UI, visible when the client loses WebSocket connection to the server, receives structural upgrades in the project template, with a new ReconnectModal
component that separates CSS and JavaScript for stricter Content Security Policy (CSP) compliance. A custom components-reconnect-state-changed
event provides finer-grained control over connection states, including a new “retrying” phase.
API developers gain built-in support for propagating XML source code comments into OpenAPI documents. The feature requires enabling documentation file generation in the project file (GenerateDocumentationFile
property) and moves comment processing to compile time via a source generator. However, minimal API endpoints must now use named methods rather than lambdas to leverage this feature, which can be seen as a trade-off for better discoverability.
The underlying OpenAPI.NET library is updated to version 2.0.0-preview7
, introducing breaking changes for advanced users. Schema definitions now use interfaces, and the Nullable
property for the schema is replaced with JsonSchemaType.Null
checks.
The Preview 2 also introduces minor quality of life improvements:
- Blazor
QuickGrid
control adds aCloseColumnOptionsAsync
method for programmatically dismissing column menus, simplifying filter interactions. - Form binding now treats empty strings as null for nullable types, matching minimal API behavior elsewhere.
- New authentication metrics for Aspire dashboard track sign-in/sign-out events and authorization attempts, while request duration telemetry helps identify performance bottlenecks.
Preview 2 is available now via the .NET 10 Preview SDK. Developers should test navigation changes and OpenAPI integration, with particular attention to the breaking schema modifications. The team expects the .NET 10 to be released around November 2025.