Skip to content

Remove explicit Microsoft.CodeAnalysis.Analyzers 3.11.0 dependency - #15146

Merged
JanProvaznik merged 1 commit into
mainfrom
janprovaznik-remove-roslyn-analyzers
Sep 25, 2026
Merged

JanProvaznik merged 1 commit into
mainfrom
janprovaznik-remove-roslyn-analyzers

Conversation

@JanProvaznik

Copy link
Copy Markdown
Member

Related issue(s):

Fixes: #15145

Context

The explicit Microsoft.CodeAnalysis.Analyzers 3.11.0 dependency is reported to break source-build. It supplies analyzer-authoring checks, not MSBuild's task-analyzer implementation.

Changes Made

Remove the TaskAnalyzer package reference and central version entry. Both must be removed because central transitive pinning would otherwise continue promoting the transitive dependency to 3.11.0.

Compatibility

Keep the required Roslyn libraries and existing analyzer configuration. Microsoft.CodeAnalysis.Analyzers remains transitive and resolves to 3.3.4 in the verified graphs. No runtime or task-diagnostic behavior changes are intended.

Testing

  • Full repository build, analyzer pack, and bootstrap sample build passed without warnings or errors.
  • Existing TaskAnalyzer.Tests: 368 passed, no failures or skips.
  • Normal analyzer/test restore resolves 3.3.4. Local source-only restore excludes the package by default; with BuildAnalyzer=true, it resolves 3.3.4.

Dependencies and Follow-up

No companion changes required. Full Linux source-build was not run; the reported failure still needs confirmation in that environment. Local source-only restore does not establish full source-build compatibility.

Remove the direct TaskAnalyzer reference and central 3.11.0 pin. Retain the analyzer-authoring package only through required Roslyn dependencies.

Co-authored-by: Copilot App <[email protected]>
@JanProvaznik
JanProvaznik requested a review from a team as a code owner September 25, 2026 11:42
Copilot AI lite review requested due to automatic review settings September 25, 2026 11:42

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 review overview

🔵 Needs a closer look

Analyzer-check preservation and source-only build validation remain unresolved.

Review effort: Lite
Findings: None

What changed in this PR

Removes the explicit Roslyn analyzer dependency and central version pin to improve source-build compatibility.

Changes:

  • Removes the package reference from TaskAnalyzer.csproj.
  • Removes the centrally pinned version.
File Summary Review findings
src/​TaskAnalyzer/​TaskAnalyzer.csproj Removes the analyzer-authoring package reference. Moderate (1 vote): Preserve or explicitly gate the RS analyzer checks. Moderate (1 vote): Validate the Linux source-only build.
eng/​dependabot/​Directory.Packages.props Removes the corresponding central version pin. —

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

@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.

✅ 24/24 dimensions clean — no findings.

Warning

Firewall blocked 3 domains

The following domains were blocked by the firewall during workflow execution:

  • api.github.com
  • api.nuget.org
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.github.com"
    - "api.nuget.org"
    - "github.com"

See Network Configuration for more information.

Generated by Expert Code Review (on open) for #15146 · copilot · gpt56 · 349.1 AIC · ⌖ 5.17 AIC · ⊞ 17.8K

@JanProvaznik
JanProvaznik enabled auto-merge (squash) September 25, 2026 11:59
@JanProvaznik
JanProvaznik merged commit 413c17a into main Sep 25, 2026
22 checks passed
@JanProvaznik
JanProvaznik deleted the janprovaznik-remove-roslyn-analyzers branch September 25, 2026 12:42

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 0b674d83 Deployed Sep 25, 2026 by JanProvaznik via conclusion #934
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get rid of Microsoft.CodeAnalysis.Analyzers v3.11 which breaks sourcebuild

3 participants