Enlighten ResolveKeySource task for multithreaded mode
Parent: #11834
Context
ResolveKeySource uses File.OpenRead(KeyFile) to read PFX key files. The KeyFile path could be relative, resolving against Environment.CurrentDirectory under multithreaded execution.
Sin 1 risk: ResolvedKeyFile = KeyFile assigns the input path directly to an [Output] property. After absolutization, we must use the original path for the output to avoid contamination.
Approach
- Mark
ResolveKeySource with [MSBuildMultiThreadableTask] and implement IMultiThreadableTask
- Absolutize
KeyFile via TaskEnvironment.GetAbsolutePath() before File.OpenRead()
- Preserve original
KeyFile string for ResolvedKeyFile output property (Sin 1)
- Use
OriginalValue in error messages (Sin 2)
Acceptance criteria
References
Enlighten ResolveKeySource task for multithreaded mode
Parent: #11834
Context
ResolveKeySourceusesFile.OpenRead(KeyFile)to read PFX key files. TheKeyFilepath could be relative, resolving againstEnvironment.CurrentDirectoryunder multithreaded execution.Sin 1 risk:
ResolvedKeyFile = KeyFileassigns the input path directly to an[Output]property. After absolutization, we must use the original path for the output to avoid contamination.Approach
ResolveKeySourcewith[MSBuildMultiThreadableTask]and implementIMultiThreadableTaskKeyFileviaTaskEnvironment.GetAbsolutePath()beforeFile.OpenRead()KeyFilestring forResolvedKeyFileoutput property (Sin 1)OriginalValuein error messages (Sin 2)Acceptance criteria
ResolveKeySourcedecorated[MSBuildMultiThreadableTask]and implementsIMultiThreadableTaskKeyFileabsolutized beforeFile.OpenRead()[Output] ResolvedKeyFilepreserves original path string (Sin 1)References
.github/skills/multithreaded-task-migration/SKILL.md