msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Consider removing custom TaskFactory support

Open JanProvaznik opened this issue 6 months ago • 0 comments

It is a very niche feature with unclear use-case https://github.com/search?q=%22%3A+ITaskFactory%22+language%3AC%23+Microsoft.Build.Framework&type=code, that assumes runtime of it's tasks in-process, which is dangerous when we're refactoring MSBuild to multithreaded execution https://github.com/dotnet/msbuild/issues/11914

The model now is that Initialize creates an in memory assembly of an ITask and TaskExecutionHost can instantiate it. An in-memory assembly can't travel to an TaskHost node process.

Alternative: breaking change of assumption that it must produce temporary assets/dll in <someplace>, the task can be loaded from that dll in another process and <someplace> will be purged after build.

JanProvaznik avatar Jun 03 '25 15:06 JanProvaznik