dotnet / dotnet/msbuild

Migrate GenerateBootstrapper to multithreaded execution

Open
#13,627 0 comments 0 reactions 0 assignees View on GitHub
Area: Multithreaded Priority:2 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

## Background
`GenerateBootstrapper` produces ClickOnce setup.exe / bootstrapper artifacts by delegating to the internal `BootstrapperBuilder`. It exposes many path inputs and an `OutputPath` that defaults to `Directory.GetCurrentDirectory()`, both of which break under multithreaded execution.

## Migration scope
- [ ] Apply `[MSBuildMultiThreadableTask]`
- [ ] Implement `IMultiThreadableTask`
- [ ] Absolutize paths via `TaskEnvironment.GetAbsolutePath()` for: BootstrapperItems (ItemSpec), ApplicationFile, BootstrapperKeyFile, ComponentsLocation, OutputPath, Path, SupportUrl-derived paths
- [ ] Use `TaskEnvironment.GetEnvironmentVariable()` for: N/A (delegated builder may need review)
- [ ] Use `TaskEnvironment.GetProcessStartInfo()` for: N/A

## Known complexity factors
- Default `OutputPath = Directory.GetCurrentDirectory()` must be re-derived from `TaskEnvironment.ProjectDirectory`
- Delegates heavy work to `BootstrapperBuilder` (under `src/Tasks/BootstrapperUtil/`) which performs its own file I/O and XML reads — propagate `TaskEnvironment` or absolutize before passing
- Sets `[Output]` `BootstrapperComponentFiles`/`BootstrapperKeyFile` from internal builder — preserve original-form values (Sin 1)
- Windows-only, NETFRAMEWORK-only feature path

## Exit criteria
- [ ] Build clean, no new warnings
- [ ] Existing tests pass
- [ ] No regression in error message paths (Sin 2 audit)
- [ ] No leakage of absolutized paths into [Output] properties (Sin 1 audit)

## References
- Parent: #11834
- Migration skill: .github/skills/multithreaded-task-migration/SKILL.md

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.