Skip to content

Add TaskEnvironment.GetTempPath() #14583

Closed

Description

@OvesN

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

  1. self-assigned this
    on Jul 30, 2026
  2. jaredpar commented on Aug 12, 2026

    @jaredpar
    Member

    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

  3. assigned and unassigned on Aug 13, 2026
  4. linked a pull request that will close this issueAdd TaskEnvironment.GetTempPath() #14729on Aug 18, 2026
  5. AR-May commented on Aug 18, 2026

    @AR-May
    Member

    Main issues with using Path.GetTempPath() are

    • Stale environment variables: in case some task would modify the environment variables that were used for defining the tmp path.
    • Relative paths in the environment variables that were used for defining the tmp path.
  6. ViktorHofer commented on Aug 19, 2026

    @ViktorHofer
    Member

    If we introduce that new API, consider issues around TEMP like #6219

  7. added a commit that references this issue on Sep 21, 2026
    e3683a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions