Repository navigation
Move to Roslyn's unified ExternalAccess library - #68014
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates ASP.NET Core analyzers infrastructure to consume Roslyn’s unified ExternalAccess library by switching assembly/package references and aligning the repo’s Roslyn dependency versions accordingly. This helps reduce ExternalAccess assembly loads in VS scenarios and enables building against newer Roslyn bits.
Changes:
- Switch analyzer assembly reference from
Microsoft.CodeAnalysis.ExternalAccess.AspNetCoretoMicrosoft.CodeAnalysis.Features.ExternalAccess. - Update Roslyn package versions to
5.10.0-1.26357.6and adjust dependency metadata accordingly. - Opt into Arcade’s Microsoft.Net.Compilers flow and pin the compiler toolset version to match the Roslyn update.
Show a summary per file
| File | Description |
|---|---|
| src/Framework/AspNetCoreAnalyzers/src/Analyzers/RouteEmbeddedLanguage/README.md | Updates documentation to reference the unified ExternalAccess assembly name. |
| src/Framework/AspNetCoreAnalyzers/src/Analyzers/Microsoft.AspNetCore.App.Analyzers.csproj | Switches the ExternalAccess assembly reference to Microsoft.CodeAnalysis.Features.ExternalAccess. |
| eng/Versions.props | Bumps Roslyn version, opts into Microsoft.Net.Compilers usage, and pins compiler toolset version. |
| eng/Version.Details.xml | Updates Roslyn dependency entries (names/versions/shas) to match the new Roslyn build. |
| eng/Version.Details.props | Renames/updates version properties for the unified ExternalAccess package and Roslyn version bump. |
| eng/Dependencies.props | Updates dependency list and source-only overrides to use the unified ExternalAccess package name. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 0
wtgodbe
pushed a commit
to wtgodbe/aspnetcore
that referenced
this pull request
Jul 29, 2026
…tern, cover all DependabotDiscovery exclusion categories Copilot's automated review on dotnet#68097 caught two real bugs: - The Include="..." regex only matched self-closing tags with no other attributes, silently missing entries like <LatestPackageReference Include="xunit.v3" Version="$(XunitV3Version)" />. Fixed with a regex that tolerates any attributes/tag layout, and now joins file content into one string so a tag split across lines is still matched. - 'return , $x' combined with inconsistent @(...) wrapping at call sites caused double array-wrapping in some paths, silently shrinking the Maestro-managed-properties set from ~440 entries to 1-2. Removed the comma-trick entirely; every call site now consistently wraps in @(...). Additionally, two independent review agents pointed out that eng/tools/DependabotDiscovery/README.md documents more exclusion categories than just Maestro: packages pinned via the shared $(IdentityModelVersion) property, packages mapped to an in-repo project via ProjectReferenceProvider (eng/ProjectReferences.props), and two hard-coded packages (NETStandard.Library, Microsoft.CodeAnalysis.PublicApiAnalyzers). The check now recognizes all of these, matching the original error message's intent ('isn't managed by Maestro or the shared $(IdentityModelVersion) property'). Verified end-to-end in isolated worktrees against the real repo history: - PR dotnet#68014's actual rename (Maestro-managed) - passes - A synthetic new, non-excluded package addition - still fails as expected - A full IdentityModel-managed rename (Dependencies.props + Versions.props) - passes - A ProjectReferenceProvider-mapped name - passes - The hard-coded NETStandard.Library exclusion - passes Co-authored-by: Copilot <[email protected]>
…king for InvalidOperation.
wtgodbe
added a commit
that referenced
this pull request
Jul 30, 2026
…nges (#68097) * Only require DependabotDiscovery.csproj update for non-Maestro dependency changes The CodeCheck added in #68012 flagged any add/remove in eng/Dependencies.props as requiring a matching update to eng/tools/DependabotDiscovery/DependabotDiscovery.csproj. This incorrectly fires when a Maestro-managed package is renamed (as in #68014), since that shows up as one add + one remove even though DependabotDiscovery.csproj never referenced it (Maestro-managed packages are excluded, see the project's README). Now the check compares the set of <LatestPackageReference Include="..." /> names before/after and only requires a DependabotDiscovery.csproj update when an added or removed package has no matching version property in eng/Version.Details.props (i.e. isn't managed by Maestro). Co-authored-by: Copilot <[email protected]> * Address PR review feedback: fix regex, avoid fragile array-return pattern, cover all DependabotDiscovery exclusion categories Copilot's automated review on #68097 caught two real bugs: - The Include="..." regex only matched self-closing tags with no other attributes, silently missing entries like <LatestPackageReference Include="xunit.v3" Version="$(XunitV3Version)" />. Fixed with a regex that tolerates any attributes/tag layout, and now joins file content into one string so a tag split across lines is still matched. - 'return , $x' combined with inconsistent @(...) wrapping at call sites caused double array-wrapping in some paths, silently shrinking the Maestro-managed-properties set from ~440 entries to 1-2. Removed the comma-trick entirely; every call site now consistently wraps in @(...). Additionally, two independent review agents pointed out that eng/tools/DependabotDiscovery/README.md documents more exclusion categories than just Maestro: packages pinned via the shared $(IdentityModelVersion) property, packages mapped to an in-repo project via ProjectReferenceProvider (eng/ProjectReferences.props), and two hard-coded packages (NETStandard.Library, Microsoft.CodeAnalysis.PublicApiAnalyzers). The check now recognizes all of these, matching the original error message's intent ('isn't managed by Maestro or the shared $(IdentityModelVersion) property'). Verified end-to-end in isolated worktrees against the real repo history: - PR #68014's actual rename (Maestro-managed) - passes - A synthetic new, non-excluded package addition - still fails as expected - A full IdentityModel-managed rename (Dependencies.props + Versions.props) - passes - A ProjectReferenceProvider-mapped name - passes - The hard-coded NETStandard.Library exclusion - passes Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Will Godbe <[email protected]> Co-authored-by: Copilot <[email protected]>
Member
Author
|
Well, I thought we could get this in by simply having Arcade use the newer compilers, but some tests are trying to build with bits and getting them to use the compiler package may not be worth it. I will wait until this repo is using a preview 7 SDK and we can revert the unnecessary changes to the version.props. |
JoeRobich
requested review from
Youssef1313,
cincuranet and
rokonec
as code owners
August 20, 2026 06:15
Copilot stopped work on behalf of
JoeRobich due to an error
August 20, 2026 06:28
wtgodbe
approved these changes
Aug 24, 2026
Member
Author
|
@wtgodbe This is ready to go in. Thanks for your help! |
wtgodbe
approved these changes
Aug 31, 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.
Move to Roslyn's unified ExternalAccess library
Change references to
Microsoft.CodeAnalysis.ExternalAccess.AspNetCoreinto references toMicrosoft.CodeAnalysis.Features.ExternalAccess.Description
It is necessary to consume a newer version of Roslyn to bring in the new unified EA library. This version has already inserted into the .NET 11 SDK, the C# extension for VS Code, and VS main.
Building analyzers against a newer version of Roslyn requires a newer version of the Roslyn compiler to host the analyzers during the build. This required changes to the global.json configuration to pin the .NET SDK to preview 7.
Fixes #68013