Summary
16 first-party .csproj files carry <Analyzer Include> HintPaths naming older Meziantou.Analyzer/Roslynator.Analyzers versions than the versions declared in their sibling packages.config files, so a clean-worktree NuGet restore followed by the repo's analyzer-baseline build fails with CS0006 (metadata file not found) for every affected project.
Environment
- OS/version: Windows, .NET Framework / VSTO toolchain
- Command/flags used:
msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU" /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=true in a fresh worktree with no pre-populated packages/ directory
- Data source or fixture: N/A
Steps to Reproduce
- Create a new git worktree/clone of the repository with no
packages/ directory present.
- Run
dotnet tool restore and the repo's standard NuGet restore for the solution.
- Run the analyzer-baseline msbuild command above.
Expected Behavior
The analyzer-baseline build succeeds against whatever Meziantou.Analyzer/Roslynator.Analyzers versions are declared in each project's packages.config.
Actual Behavior
10 CS0006 errors occur: the affected .csproj files' <Analyzer Include> items hard-code HintPaths to Meziantou.Analyzer.3.0.156 and Roslynator.Analyzers.4.16.0, while the corresponding packages.config entries declare 3.0.174 and 4.16.1 respectively, so NuGet restores the newer package directories and the older, csproj-referenced paths never exist on disk.
Logs / Screenshots
Impact / Severity
Source
From: docs/features/potential/2026-08-28-csproj-analyzer-hintpath-packages-config-version-skew.md
Summary
16 first-party
.csprojfiles carry<Analyzer Include>HintPaths naming older Meziantou.Analyzer/Roslynator.Analyzers versions than the versions declared in their siblingpackages.configfiles, so a clean-worktree NuGet restore followed by the repo's analyzer-baseline build fails withCS0006(metadata file not found) for every affected project.Environment
msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU" /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=truein a fresh worktree with no pre-populatedpackages/directorySteps to Reproduce
packages/directory present.dotnet tool restoreand the repo's standard NuGet restore for the solution.Expected Behavior
The analyzer-baseline build succeeds against whatever
Meziantou.Analyzer/Roslynator.Analyzersversions are declared in each project'spackages.config.Actual Behavior
10
CS0006errors occur: the affected.csprojfiles'<Analyzer Include>items hard-code HintPaths toMeziantou.Analyzer.3.0.156andRoslynator.Analyzers.4.16.0, while the correspondingpackages.configentries declare3.0.174and4.16.1respectively, so NuGet restores the newer package directories and the older, csproj-referenced paths never exist on disk.Logs / Screenshots
CS0006: Metadata file 'packages\Meziantou.Analyzer.3.0.156\analyzers\...\Meziantou.Analyzer.dll' could not be found(and the Roslynator.Analyzers 4.16.0 equivalent), repeated across 16 first-party projects.Impact / Severity
Source
From: docs/features/potential/2026-08-28-csproj-analyzer-hintpath-packages-config-version-skew.md