Skip to content

Develop thread-safe task authoring experience #12463

Closed
12 of 12 issues completed
Closed

Description

@AR-May

Tasks written for multi-process builds use process-wide state: the current directory, environment variables, and paths resolved against them. That is not safe when every project runs as a thread in one process. This epic gives task authors an API to use instead: the new task type, TaskEnvironment for environment variables and path resolution, and AbsolutePath for paths that do not depend on process state.

The main API work is done. What is left are open design questions. We answer them and extend the API only when task migration shows a real need.

Milestones

Steps

  • Design and add the new task API
  • Support new tasks API in out-of-process nodes and in thread-based nodes
  • Let task authors unit test their tasks against new API

Optional, on demand:

  • Extend the API when task migration finds a gap

Costing

On demand. The remaining items are open questions, not planned work.

Stakeholders

Task authors: the MSBuild, SDK, NuGet and Roslyn teams migrating tasks now, and other task authors after them.

Definition of done

Task authors can write a thread-safe task using only documented APIs, without using process-wide state.

Activity

  1. added this to the .NET 10 milestone on Aug 29, 2025
  2. added theissue type on Sep 1, 2025
  3. changed the title [-][Multithreaded MSBuild] Develop thread-safe task authoring experience[/-] [+]Develop thread-safe task authoring experience[/+] on Sep 10, 2025
  4. 15 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions