Develop Roslyn analyzers that help MSBuild task authors find correctness, reliability and performance problems at development time instead of during testing or in production builds.
The scope of this epic covers designing and implementing new diagnostics and their code fixes, both for multithreaded task migration and for problems unrelated to it.
Gaps found in the Csc/Vbc multithreaded-task migration audit
MSBuildTask0002
MSBuildTask0003
MSBuildTask0005
MSBuildTask0006
MSBuildTask0007
MSBuildTask0011
New diagnostics or non-analyzer mitigations
MSBuildTask0001, MSBuildTask0004, MSBuildTask0008, MSBuildTask0009, and MSBuildTask0010 were not materially implicated by the reviewed migration findings.
Develop Roslyn analyzers that help MSBuild task authors find correctness, reliability and performance problems at development time instead of during testing or in production builds.
The scope of this epic covers designing and implementing new diagnostics and their code fixes, both for multithreaded task migration and for problems unrelated to it.
Gaps found in the Csc/Vbc multithreaded-task migration audit
MSBuildTask0002
Path.GetFullPathcode fix changes canonicalization semantics. Recommended mitigation: Implement canonicalization or accept the divergence and note it to users.Path.IsPathRooteddoes not guarantee a fully qualified path. Recommended mitigation: DiagnoseIsPathRootedin path-resolution logic and recommendIsPathFullyQualifiedor explicit absolutization.dotnet.exefrom filesystem paths. Recommended mitigation: Track path intent or avoid offeringGetAbsolutePathwhen the value may use command lookup.Environment.GetCommandLineArgsandEnvironment.GetLogicalDrives. Recommended mitigation: Add them toBannedApiDefinitions.$PATHsearch or changed fallback behavior. Recommended mitigation: Add targeted checks for process-launch helpers, backed by behavioral tests; general equivalence is not statically provable.MSBuildTask0003
GetAbsolutePathresult is considered safe without checking canonicalization, provenance, or intended use. Recommended mitigation: Track path state, including whether a value is qualified, canonical, or a command name, and require the state expected by the consuming API.MSBuildTask0005
GetAbsolutePath" assumption as MSBuildTask0002 and MSBuildTask0003. Recommended mitigation: Reuse richer path-state analysis instead of treating one wrapper method as universally safe.MSBuildTask0006
[MSBuildMultiThreadableTask], missing operations inherited from unmarked bases such asManagedCompiler. Recommended mitigation: Analyze the complete task hierarchy and the closure of derived tasks enabled by the attribute.[Output]properties, so normalized paths may leak into outputs or diagnostics. Recommended mitigation: Add a separate rule requiring preservation ofOriginalValuefor externally visible values.MSBuildTask0007
ITaskItemparameters. Recommended mitigation: Analyze inherited task parameters and their consumers across the task hierarchy.MSBuildTask0011
ToolTask-derived tasks that needTaskEnvironmentonly during execution. Recommended mitigation: Report only when constructor injection is demonstrably required or matches the task's construction model.New diagnostics or non-analyzer mitigations
[MSBuildMultiThreadableTask]attribute. Recommended mitigation: Add a migration-completeness diagnostic for concrete task types.IsPathFullyQualifiedpolyfill matches the BCL contract. Recommended mitigation: Prefer a shared framework implementation; otherwise require contract tests against the BCL.MSBuildTask0001, MSBuildTask0004, MSBuildTask0008, MSBuildTask0009, and MSBuildTask0010 were not materially implicated by the reviewed migration findings.