Add `TaskEnvironment.GetTempPath()` that matches `Path.GetTempPath()` while resolving environment variables through the task environment. This is needed to safely migrate tasks such as `Csc` to multithreaded execution.
Activity
jaredpar commentedon Aug 12, 2026
A while back I had to work out what the implementation of that API was and this is what we came up with:
https://gist.github.com/jaredpar/e2732871831222dd74b3435502e472a2
AR-May commentedon Aug 18, 2026
Main issues with using
Path.GetTempPath()areViktorHofer commentedon Aug 19, 2026
If we introduce that new API, consider issues around TEMP like #6219
Add TaskEnvironment.GetTempPath() (dotnet#14729)
Document safe temporary file creation for tasks (#15091)