Enlighten SignFile task for multithreaded mode
Parent: #11834
Context
SignFile passes SigningTarget.ItemSpec to SecurityUtilities.SignFile() which performs file I/O. Under multithreaded execution, relative paths would resolve against Environment.CurrentDirectory (shared process state) rather than the project directory.
Approach
- Mark
SignFile with [MSBuildMultiThreadableTask] and implement IMultiThreadableTask with public TaskEnvironment TaskEnvironment { get; set; } = TaskEnvironment.Fallback;
- Absolutize
SigningTarget.ItemSpec via TaskEnvironment.GetAbsolutePath() before passing to SecurityUtilities.SignFile()
- Use
OriginalValue in error messages to avoid path inflation (Sin 2)
Acceptance criteria
References
Enlighten SignFile task for multithreaded mode
Parent: #11834
Context
SignFilepassesSigningTarget.ItemSpectoSecurityUtilities.SignFile()which performs file I/O. Under multithreaded execution, relative paths would resolve againstEnvironment.CurrentDirectory(shared process state) rather than the project directory.Approach
SignFilewith[MSBuildMultiThreadableTask]and implementIMultiThreadableTaskwithpublic TaskEnvironment TaskEnvironment { get; set; } = TaskEnvironment.Fallback;SigningTarget.ItemSpecviaTaskEnvironment.GetAbsolutePath()before passing toSecurityUtilities.SignFile()OriginalValuein error messages to avoid path inflation (Sin 2)Acceptance criteria
SignFiledecorated[MSBuildMultiThreadableTask]and implementsIMultiThreadableTaskSigningTarget.ItemSpecabsolutized beforeSecurityUtilities.SignFile()callAbsolutePathleak into user-visible output (Sin 1)References
.github/skills/multithreaded-task-migration/SKILL.md