Skip to content

TaskAnalyzer: retire MSBuildTask0005 and simplify transitive diagnostics #15284

Open

Description

@VolPlita

Work kind

Delivery

Outcome

Retire the separate MSBuildTask0005 rule and simplify the task analyzer's rule structure.

MSBuildTask0005 reports unsafe APIs reached through helper calls. Its independent Warning severity can differ from the severity of the rule for the same direct call. Configuration and suppression also use different IDs.

#14777 provides a small immediate fix: restrict MSBuildTask0004 and MSBuildTask0005 to MT analysis, while preserving explicit migration analysis. It deliberately does not redesign transitive diagnostics.

Completion criteria

  • Agree on the replacement design. Decide whether to retain useful call-chain findings under the originating rule IDs or remove transitive reporting.
  • Document how the design handles severity, suppression, call-site locations, task-entry locations, and duplicate reports.
  • Define the transition for existing MSBuildTask0005 configuration, pragmas, and suppression attributes. Do not silently turn a suppressed warning into a new warning.
  • Implement retirement of the separate rule and remove code used only by MSBuildTask0005.
  • Preserve the protection for regular tasks established by Limit TaskAnalyzer review and transitive warnings to MT-scoped tasks #14777. Check warnings-as-errors builds explicitly.
  • Add regressions for direct calls, helper chains, shared task implementations, and the configuration transition.
  • Update rule documentation and release notes.

The replacement and configuration transition need maintainer design review before implementation.

Scope and non-goals

This issue covers retiring the dedicated rule, not necessarily removing all call-chain analysis.

Do not restore effective-severity inheritance as an intermediate solution. Use normal Roslyn configuration for any retained diagnostics.

This is follow-up design work, not part of the minimal 18.12 backport.

Dependencies and handoff

Related: #14777 and the analyzer follow-up epic #14772.

Establish the post-14777 behavior as the baseline. Resolve the replacement and compatibility decisions before implementing retirement.

Activity

  1. self-assigned this
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: Multithreadedneeds-designRequires discussion with the dev team before attempting a fix.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions