Skip to content

[main] Bump Microsoft.CodeAnalysis from 3.11.0 to 5.9.0 - #10619

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/Microsoft.CodeAnalysis-5.9.0
Open

[main] Bump Microsoft.CodeAnalysis from 3.11.0 to 5.9.0#10619
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/Microsoft.CodeAnalysis-5.9.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 18, 2026

Copy link
Copy Markdown
Contributor

Updated Microsoft.CodeAnalysis from 3.11.0 to 5.9.0.

Release notes

Sourced from Microsoft.CodeAnalysis's releases.

5.0.4

Release

5.0.2

Release Notes
Install Instructions

Repos

5.0.1

Release Notes
Install Instructions

Repo

4.2.0-4.22266.5

Release

4.2.0-3.22151.16

Release

4.2.0-1.22108.11

Release

4.0.0-2.21354.7

Release

4.0.0-2.21254.26

Release

4.0.0-1.21277.15

Release

Commits viewable in compare view.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: Microsoft.CodeAnalysis
  dependency-version: 5.9.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Copilot AI balanced review requested due to automatic review settings August 18, 2026 06:41
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Updates to dependency manifests. labels Aug 18, 2026

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.

Pull request overview

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Updates the centrally managed Roslyn (Microsoft.CodeAnalysis) version used across the repo.

Changes:

  • Bumped MicrosoftCodeAnalysisVersion from 3.11.0 to 5.9.0.

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

Comment thread Directory.Packages.props
Comment on lines 32 to 33
<MicrosoftCodeAnalysisVersionForTests>4.10.0</MicrosoftCodeAnalysisVersionForTests>
<MicrosoftCodeAnalysisVersionForSourceGen>4.8.0</MicrosoftCodeAnalysisVersionForSourceGen>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 9 build legs fail identically during NuGet restore with NU1605 (package downgrade promoted to error), because this PR bumps MicrosoftCodeAnalysisVersion to 5.9.0 without raising the pinned Microsoft.CodeAnalysis.Analyzers version to match.

Root cause 1: Microsoft.CodeAnalysis.Analyzers pin is now lower than what Microsoft.CodeAnalysis.Common/Microsoft.CodeAnalysis.CSharp.Workspaces 5.9.0 require

This PR raises MicrosoftCodeAnalysisVersion from 3.11.0 to 5.9.0 in Directory.Packages.props. Microsoft.CodeAnalysis.Common 5.9.0 and Microsoft.CodeAnalysis.CSharp.Workspaces 5.9.0 both transitively require Microsoft.CodeAnalysis.Analyzers >= 5.9.0-1.26328.17, but Directory.Packages.props still pins the direct Microsoft.CodeAnalysis.Analyzers PackageVersion at 5.6.0. NuGet resolves this as a downgrade (5.9.0-1.26328.175.6.0) for the two analyzer projects that reference it, and warnings-as-errors promotes the resulting NU1605 to a restore error, so all legs fail before compilation even starts.

Affected files / errors

  • Directory.Packages.props:30MicrosoftCodeAnalysisVersion bumped to 5.9.0; the Microsoft.CodeAnalysis.Analyzers pin was not raised alongside it
  • src/Analyzers/MSTest.Analyzers/MSTest.Analyzers.csprojNU1605: downgrade via Microsoft.CodeAnalysis.Common 5.9.0 -> Microsoft.CodeAnalysis.Analyzers (>= 5.9.0-1.26328.17)
  • src/Analyzers/MSTest.Analyzers.CodeFixes/MSTest.Analyzers.CodeFixes.csprojNU1605: downgrade via Microsoft.CodeAnalysis.CSharp.Workspaces 5.9.0 -> Microsoft.CodeAnalysis.Analyzers (>= 5.9.0-1.26328.17)

Proposed fix

Raise the Microsoft.CodeAnalysis.Analyzers PackageVersion to 5.9.0 (or at least 5.9.0-1.26328.17) so it is no longer lower than what Microsoft.CodeAnalysis.Common/CSharp.Workspaces 5.9.0 require:

-    <PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.6.0" />
+    <PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.9.0" />

This root cause explains every reported error — the same two NU1605 errors repeat verbatim across all 9 legs (Linux, macOS, Windows Debug/Release, application-model acceptance), because restore fails identically on every platform before any leg-specific compilation begins.


Build overview
  • Failing target: Restore (RestoreTask) — package downgrade detected during NuGet restore
  • Affected legs: Linux Release/Debug, macOS Release/Debug, Windows Debug (x2), Windows application-model acceptance Debug, Windows Release (x2) — 9/9 legs report the identical pair of errors
  • No compilation errors observed on any leg — the failure is 100% a restore-time NU1605 promoted to error
All MSBuild errors (2 unique, repeated across all 9 legs)
Code Project Message
NU1605 MSTest.Analyzers.csproj Downgrade: Microsoft.CodeAnalysis.Analyzers from 5.9.0-1.26328.17 to 5.6.0 (via Microsoft.CodeAnalysis.Common 5.9.0)
NU1605 MSTest.Analyzers.CodeFixes.csproj Downgrade: Microsoft.CodeAnalysis.Analyzers from 5.9.0-1.26328.17 to 5.6.0 (via Microsoft.CodeAnalysis.CSharp.Workspaces 5.9.0)

🤖 Generated by the Build Failure Analysis workflow using binlog-mcp · commit a4d8232

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · auto · 61.8 AIC · ⌖ 2.08 AIC · ⊞ 11.6K · [◷]( · )

@github-actions github-actions Bot 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.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · auto · 61.8 AIC · ⌖ 2.08 AIC · ⊞ 11.6K ·

Comment thread Directory.Packages.props
<AspireHostingTestingVersion>13.4.6</AspireHostingTestingVersion>
<MicrosoftBuildVersion>17.11.48</MicrosoftBuildVersion>
<MicrosoftCodeAnalysisVersion>3.11.0</MicrosoftCodeAnalysisVersion>
<MicrosoftCodeAnalysisVersion>5.9.0</MicrosoftCodeAnalysisVersion>

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.

🔧 NU1605MicrosoftCodeAnalysisVersion is being bumped to 5.9.0 here, but the separately-pinned Microsoft.CodeAnalysis.Analyzers PackageVersion (elsewhere in this file, currently 5.6.0) is now lower than the >= 5.9.0-1.26328.17 required transitively by Microsoft.CodeAnalysis.Common/Microsoft.CodeAnalysis.CSharp.Workspaces 5.9.0. This causes an NU1605 downgrade error (promoted to a hard error) on every build leg. Raise the Microsoft.CodeAnalysis.Analyzers PackageVersion to 5.9.0 as well.

Suggested change
<MicrosoftCodeAnalysisVersion>5.9.0</MicrosoftCodeAnalysisVersion>
<MicrosoftCodeAnalysisVersion>5.9.0</MicrosoftCodeAnalysisVersion>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Updates to dependency manifests. .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant