dotnet / dotnet/msbuild

Remove dependency on CurrentDirectory from all MS-owned tasks

Open
#3,630 2 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

We should clean up at least the tasks that we own to remove the dependency on CurrentDirectory.

Things like this:
https://referencesource.microsoft.com/#PresentationBuildTasks/BuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass1.cs,83

This would move use one step closer to being able to run targets in parallel where possible (currently not possible because tasks depend on Environment.CurrentDirectory and you can't have two different ones simultaneously).

Also it's good for reproducible builds, so that it doesn't matter where you're running the build from. Otherwise we can get stuff like this:

![image](https://user-images.githubusercontent.com/679326/44290641-80ecd480-a22e-11e8-9afa-7489de91c7cd.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by auditing the MS-owned tasks, using PresentationBuildTasks/BuildTasks/Microsoft/Build/Tasks/Windows/MarkupCompilePass1.cs around the referenced CurrentDirectory use as an entry point. Identify each task dependency on Environment.CurrentDirectory and define done as removing those dependencies while preserving reproducible, parallel-safe builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.