Skip to content

Ship the MSBuild task-authoring analyzers #14078

Closed
4 of 6 issues completed
Closed

Description

@jankratochvilcz

The task-authoring analyzers validate MSBuild task code, including multithreaded-task safety. They now build as the standalone Microsoft.Build.TaskAuthoring.Analyzer package. The package is opt-in and is not exposed transitively by Microsoft.Build.Framework.

Steps

Stakeholders

Task authors in dotnet/sdk, dotnet/nuget, dotnet/roslyn, dotnet/arcade, the VMR, and other repositories that explicitly install Microsoft.Build.TaskAuthoring.Analyzer.

Definition of done

A task author can explicitly install Microsoft.Build.TaskAuthoring.Analyzer from NuGet.org. The default rules do not add build-breaking diagnostics for regular non-MT tasks, full migration analysis has documented opt-in configuration, there are no known P1 false positives, and the VMR and Arcade build with the analyzer.

Activity

  1. baronfel commented on Jun 16, 2026

    @baronfel
    Member

    @jankratochvilcz the idea to tie the diagnostics to the presence of the attribute was more defensive than that - it's a library compat issue where the analyzer could run on a user that didn't have the same runtime version of MSBuild. If the user wasn't targeting a version of MSBuild Hosts that understood MT (or the type-parameter binding) then their Task would start to crash.

  2. jankratochvilcz commented on Jun 17, 2026

    @jankratochvilcz
    ContributorAuthor

    @baronfel please feel free to amend the ticket 🙏

  3. ViktorHofer commented on Aug 4, 2026

    @ViktorHofer
    Member

    MSBuild triage: We should do this for MT on by default. Needs an assignee.

  4. self-assigned this
    on Aug 13, 2026
  5. ViktorHofer commented on Aug 19, 2026

    @ViktorHofer
    Member

    Immediate next focus: Getting the analyzer triggers right and ship them via Microsoft.Build.Framework. Fixing the triggers is important so that we don't accidentally regress existing non-MT tasks. Afterwards focus on the overall quality of these analyzers.

  6. 1 remaining item

  7. changed the title [-][MT] Ship multi-threaded task analyzer as a NuGet package[/-] [+]Ship the MSBuild task-authoring analyzers[/+] on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions