Skip to content

Fix Microsoft.CodeAnalysis.Analyzers version mismatch - #55654

Merged
nagilson merged 1 commit into
mainfrom
marcpopmsft-fix-main-ci-analyzer-version
Aug 6, 2026
Merged

Fix Microsoft.CodeAnalysis.Analyzers version mismatch#55654
nagilson merged 1 commit into
mainfrom
marcpopmsft-fix-main-ci-analyzer-version

Conversation

@marcpopMSFT

Copy link
Copy Markdown
Member

Public main CI builds 1543163 and 1543195 fail restore with NU1109 because the newly added central Microsoft.CodeAnalysis.Analyzers pin is lower than the minimum required by the Roslyn packages currently flowing into main.

Update the central version from 5.10.0-1.26363.117 to the minimum compatible 5.10.0-1.26365.3. This preserves the intended analyzer dogfooding while avoiding unnecessary dependency churn.

Validated by restoring the Razor SDK tool and Template Engine unit test projects that failed in CI.

Raise the central analyzer package version to the minimum required by the Roslyn packages currently flowing into main, preventing NU1109 restore failures in public CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 284ced01-d024-4c0b-b11a-16d2afbaee0b
Copilot AI review requested due to automatic review settings August 6, 2026 22:04
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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

Updates the centrally pinned Microsoft.CodeAnalysis.Analyzers package version to resolve restore failures (NU1109/NU1109-like “version outside dependency constraint”) caused by Roslyn package dependency minimums exceeding the current pin.

Changes:

  • Bump MicrosoftCodeAnalysisAnalyzersVersion in eng/Versions.props from 5.10.0-1.26363.117 to 5.10.0-1.26365.3 (consumed via Directory.Packages.props).

@marcpopMSFT

Copy link
Copy Markdown
Member Author

@tannergooding #55538 added this loose version for an analyzer but we end up getting a build break because of a mismatch:
https://dnceng-public.visualstudio.com/public/_build/results?buildId=1543195&view=logs&j=c30a18e4-a024-5522-098f-b760160f497a&t=6faa6839-ccca-551e-7a00-cb3d776f7e28
##[error]test\Microsoft.NET.Sdk.Razor.Tool.Tests\Microsoft.NET.Sdk.Razor.Tool.Tests.csproj(0,0): error NU1109: Detected package downgrade: Microsoft.CodeAnalysis.Analyzers from 5.10.0-1.26365.3 to centrally defined 5.10.0-1.26363.117. Update the centrally managed package version to a higher version.

Should that version be pinned like that or should it get added to version.details.xml and moved into version.details.props and get auto-updated with codeflow?

@tannergooding

Copy link
Copy Markdown
Member

Should probably be auto-updated with codeflow, I just forgot that there was a secondary bit to do on that part.

@nagilson

nagilson commented Aug 6, 2026

Copy link
Copy Markdown
Member

Failed from a hanging dotnet watch test 🔍

Force merging.

dotnet watch 🔨 Project graph loaded in 0.3s.
dotnet watch ❌ The project file could not be loaded. Could not find a part of the path '/private/tmp/helix/working/AC0D0987/t/dotnetSdkTests.W3eess5m/ProjectGraphL---86CBE703/AppWithDeps/NonExistentDirectory/X.csproj'.
[TEST ProgramTests.cs:71] Found output matching: 'dotnet watch ❌ The project file could not be loaded. Could not find a part of the path '/private/tmp/helix/working/AC0D0987/t/dotnetSdkTests.W3eess5m/ProjectGraphL---86CBE703/AppWithDeps/NonExistentDirectory/X.csproj'.'
[TEST ProgramTests.cs:72] Waiting for output matching: 'dotnet watch 🔨 Failed to load project graph.'
dotnet watch 🔨 Failed to load project graph.
[TEST ProgramTests.cs:72] Found output matching: 'dotnet watch 🔨 Failed to load project graph.'
[TEST ProgramTests.cs:73] Waiting for output matching: 'dotnet watch ⌚ Fix the error to continue or press Ctrl+C to exit.'
[Debug] Design-time build completed in 0.2s.
[Information] Loaded 1 project(s) in 0.2s.
[Debug] Watching 4 file(s) for changes
[Trace] > /private/tmp/helix/working/AC0D0987/t/dotnetSdkTests.W3eess5m/IgnoredChange---3D74C721/File.cs
[Trace] > /private/tmp/helix/working/AC0D0987/t/dotnetSdkTests.W3eess5m/IgnoredChange---3D74C721/Program.cs
[Trace] > /private/tmp/helix/working/AC0D0987/t/dotnetSdkTests.W3eess5m/IgnoredChange---3D74C721/obj/Debug/net11.0/.NETCoreApp,Version=v11.0.AssemblyAttributes.cs
[Trace] > /private/tmp/helix/working/AC0D0987/t/dotnetSdkTests.W3eess5m/IgnoredChange---3D74C721/obj/Debug/net11.0/WatchNoDepsApp.AssemblyInfo.cs
dotnet watch ❌ The project file could not be loaded. Could not find a part of the path '/private/tmp/helix/working/AC0D0987/t/dotnetSdkTests.W3eess5m/ProjectGraphL---86CBE703/AppWithDeps/NonExistentDirectory/X.csproj'.
[Debug] Exclusion glob: 'bin\Debug//**;obj\Debug//**;bin\/**;obj\/**;bin\Debug/net11.0/publish//**;**/*.user;**/*.*proj;**/*.sln;**/*.slnx;**/*.vssscc;**/.DS_Store' under project '/private/tmp/helix/working/AC0D0987/t/dotnetSdkTests.W3eess5m/IgnoredChange---3D74C721'
�[?25l�[38;5;14mSelect a device to run on:�[0m                         
                                                   
                                                   ```

@nagilson
nagilson merged commit ddbc6ec into main Aug 6, 2026
14 of 17 checks passed
@nagilson
nagilson deleted the marcpopmsft-fix-main-ci-analyzer-version branch August 6, 2026 23:45
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 7, 2026
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.

5 participants