Skip to content

Ship TaskAnalyzer with Microsoft.Build.Framework - #14812

Draft
VolPlita wants to merge 2 commits into
dotnet:mainfrom
VolPlita:vplita-ship-task-analyzer
Draft

Ship TaskAnalyzer with Microsoft.Build.Framework#14812
VolPlita wants to merge 2 commits into
dotnet:mainfrom
VolPlita:vplita-ship-task-analyzer

Conversation

@VolPlita

Copy link
Copy Markdown
Contributor

Part of #14078

Context

TaskAnalyzer must be delivered automatically to task authors before it can ship. This change packages the analyzer with Microsoft.Build.Framework, while retaining the standalone analyzer package for existing partner-repository consumption.

Depends on #14811, which establishes the safe default scope and diagnostic severities exercised by the package-consumption tests. Once #14811 merges, this PR will contain only the packaging commit.

Changes Made

  • Marked Microsoft.Build.TaskAuthoring.Analyzer as a shipping package.
  • Added the analyzer output to Microsoft.Build.Framework under analyzers/dotnet/cs.
  • Kept Roslyn implementation packages private and out of the Framework package dependencies.
  • Added end-to-end package tests that consume only the locally produced Microsoft.Build.Framework package.
  • Covered default MT-only analysis, scope=all migration mode, diagnostic suppression, warnings-as-errors, and analyzer opt-out.
  • Exercised package consumption through both dotnet build and bootstrapped MSBuild.
  • Moved the initial diagnostics into shipped analyzer release metadata and documented automatic installation through Microsoft.Build.Framework.

Testing

  • TaskAnalyzer unit tests: 262 passed, 0 failed, 0 skipped.
  • Package end-to-end tests on net11.0 and net472: 4 passed, 0 failed, 0 skipped.
  • Microsoft.Build.Framework package inspection: exactly one TaskAnalyzer DLL and no bundled or declared Roslyn dependencies.
  • Standalone Microsoft.Build.TaskAuthoring.Analyzer package generated successfully.
  • .\build.cmd -v quiet: passed with 0 warnings and 0 errors.

Notes

No packages were published. All package validation used local artifacts.

VolPlita and others added 2 commits August 24, 2026 12:31
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ViktorHofer

Copy link
Copy Markdown
Member

Added the analyzer output to Microsoft.Build.Framework under analyzers/dotnet/cs.

Just to double check, I don't think that we wanted to inline the analyzer content into Microsoft.Build.Framework based on recent discussions. It should be enough to just have the analyzer package as a package dependency of Microsoft.Build.Framework.

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.

2 participants