Repository navigation
Pin ASP.NET Core compiler-hosted Roslyn dependencies explicitly - #10336
Merged
Merged
Conversation
…ators Replace the shared source-generator version with Common and CSharp properties following the existing Analyzer_ convention. Use them in RequestDelegateGenerator, Validation, and OpenAPI, and map each to its corresponding previous-package version in source-build. Co-authored-by: Copilot <[email protected]> Copilot-Session: aab39968-c93b-478a-acee-e9f7b2eefc26
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The property definitions, generator references, and source-build mappings are consistent, with no unresolved findings.
No open issues 🎉
What changed in this PR
Standardizes ASP.NET Core generator Roslyn versions while preserving bootstrap compatibility established by #10335.
Changes:
- Uses separate Common and CSharp version properties across all three generators.
- Maps source-build overrides to corresponding N-1 packages, preserving normal-build defaults.
- Clarifies why older-VS-compatible analyzers use separate properties.
| File | Description |
|---|---|
| src/aspnetcore/src/Validation/gen/Microsoft.Extensions.Validation.ValidationsGenerator.csproj | Uses package-specific generator versions. |
| src/aspnetcore/src/OpenApi/gen/Microsoft.AspNetCore.OpenApi.SourceGenerators.csproj | Uses package-specific generator versions. |
| src/aspnetcore/src/Http/Http.Extensions/gen/Microsoft.AspNetCore.Http.RequestDelegateGenerator/Microsoft.AspNetCore.Http.RequestDelegateGenerator.csproj | Replaces the shared generator version property. |
| src/aspnetcore/eng/Versions.props | Defines separate Common and CSharp defaults. |
| repo-projects/aspnetcore.proj | Maps N-1 overrides and clarifies analyzer compatibility. |
Review effort: Balanced
Give newer framework analyzers and code fixes dedicated latest-VS defaults and N-1 source-build overrides. Apply generator pins to the remaining framework, Components, and SignalR generators. Restore live Roslyn version flow for general LatestVS consumers without changing normal-build package versions. Co-authored-by: Copilot <[email protected]> Copilot-Session: aab39968-c93b-478a-acee-e9f7b2eefc26
wtgodbe
approved these changes
Oct 20, 2026
This was referenced Oct 24, 2026
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #10335 and the review discussion.
Pin Roslyn dependencies explicitly for compiler-hosted components rather than forcing every
MicrosoftCodeAnalysisVersion_LatestVSconsumer onto N-1 packages:SourceGenerator_…Versionproperties and use them across RequestDelegateGenerator, Validation, OpenAPI, the framework generators, Components AI/Testing/NativeAot, and SignalR.Analyzer_…Version_LatestVSproperties, preserving their normal-build versions separately from the legacy analyzers.MicrosoftCodeAnalysisVersion_LatestVSoverride to current source-built Roslyn, reversing the broad version override introduced by Keep source-built ASP.NET Core analyzers bootstrap-compatible #10335 only after isolating its compiler-hosted consumers.Normal-build resolved Roslyn versions remain unchanged. Preserve the detailed bootstrap compatibility comment and explain the separate analyzer compatibility policies.
Validation
dotnet build <project> -c Release -p:UseIisNativeAssets=false, using the repository SDK).LatestVSconsumers remain live. Source-build evaluation used a synthetic package-version props file derived from the VMR override items.Microsoft.NETCore.App.Ref/12.0.0-dev. Full source-build validation was not run.Note
This pull request was prepared with GitHub Copilot.