Update CodeAnalysis and MSBuild packages - #18
Merged
Conversation
Bump Microsoft.CodeAnalysis and Microsoft.CodeAnalysis.Workspaces.MSBuild from 4.4.0 to 5.3.0 (latest), and Microsoft.Build.Locator from 1.5.5 to 1.11.2 to match. Pin Microsoft.Build.Framework to the version Workspaces.MSBuild 5.x expects, excluded from runtime assets so MSBuildLocator's copy wins.
yaakov-h
marked this pull request as ready for review
July 2, 2026 04:34
|
|
||
| public abstract ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(Project project); | ||
| public abstract ImmutableDictionary<string, ImmutableList<CodeFixProvider>> GetAllCodeFixProviders(Project project); | ||
| public ImmutableArray<DiagnosticAnalyzer> GetAnalyzers(Project project) |
Contributor
There was a problem hiding this comment.
This implementation seems like it would be specific to the Implicit strategy.
| return builder.ToImmutable(); | ||
| } | ||
|
|
||
| public ImmutableDictionary<string, ImmutableList<CodeFixProvider>> GetAllCodeFixProviders(Project project) |
Contributor
There was a problem hiding this comment.
this also seems like it would be specific to the Implicit strategy.
There was a problem hiding this comment.
Pull request overview
This PR modernizes the BulkAnalysisRunner toolchain by pinning the .NET SDK, upgrading Roslyn/MSBuild-related dependencies, enabling C# 12, and refactoring analyzer/code-fix loading to rely more on Roslyn’s analyzer-loading APIs (with added test coverage for the new loading behavior).
Changes:
- Pin the repository to a specific .NET SDK via
global.jsonand enable C# 12 / .NET analyzers inDirectory.Build.props. - Upgrade Roslyn packages and adjust runtime binding redirects to match the newer Roslyn dependency set.
- Rework analyzer/code-fix loading in
AnalyzerCache(and add tests) to avoid manual runtime assembly resolution.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/WTG.BulkAnalysis.Test/AnalyzerCacheTest.cs | Adds tests validating analyzer discovery from an explicitly provided assembly. |
| src/WTG.BulkAnalysis.Test/.editorconfig | Suppresses several Roslyn analyzer rules specifically for the test project. |
| src/WTG.BulkAnalysis.Runner/WTG.BulkAnalysis.Runner.csproj | Updates MSBuild/Roslyn-adjacent package references (e.g., MSBuild Locator, StyleCop). |
| src/WTG.BulkAnalysis.Runner/Program.cs | Removes AppDomain.AssemblyResolve hook previously used for analyzer dependency resolution. |
| src/WTG.BulkAnalysis.Runner/App.config | Updates binding redirects to align with the upgraded Roslyn and dependency versions. |
| src/WTG.BulkAnalysis.Core/WTG.BulkAnalysis.Core.csproj | Upgrades Roslyn packages and StyleCop analyzer package versions. |
| src/WTG.BulkAnalysis.Core/Processor.cs | Updates AnalyzerCache.Create(...) call to pass through context.Log. |
| src/WTG.BulkAnalysis.Core/Internal/AnalyzerCache.cs | Refactors analyzer/code-fix discovery to use AnalyzerFileReference APIs; introduces logging and caching for references/providers. |
| global.json | Pins the repo to a specific .NET SDK version. |
| Directory.Build.props | Enables C# 12 and turns on SDK-provided .NET analyzers. |
| .github/workflows/build.yaml | Adds actions/setup-dotnet@v5 to CI (but needs adjustments to reliably honor global.json). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yaakov-h
enabled auto-merge (squash)
July 3, 2026 00:45
brian-reichle
approved these changes
Jul 7, 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.
This PR: