Provide environment variables overriding routing decision for tasks
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Summary
when reviewing https://github.com/dotnet/msbuild/pull/13660 it occured to me customers may want an escape hatch to use multithreaded mode with an unchangeable task that relies on static variables
### Background and Motivation
There are 3 places a task can run in multithreaded mode: in process taskhost, out of process taskhost that remains after build (sidecar), out of process taskhost that dies after build (transient)
- Ease of testing existing tests do complicated setups to get the correct taskhost
- routing tasks that you don't control but are confident they're MT-safe to get pref benefit
### Proposed Feature
provide environment variables that override routing decision by engine:
(there is precedent with env var `MSBUILDFORCEALLTASKSOUTOFPROC`)
```bash
MSBUILDFORCETASKSINPROCHOSTLIST="Fullname.T1,Fullnamespace.T2"
MSBUILDFORCETASKSTRANSIENTHOSTLIST="Fullname.T1,Fullnamespace.T2"
MSBUILDFORCETASKSSIDECARHOSTLIST="Fullname.T1,Fullnamespace.T2"
```
### Alternative Designs
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.