dotnet / dotnet/msbuild

No good way to investigate target dependency

Open
#4,810 5 comments 0 reactions 0 assignees View on GitHub
triaged User Experience
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

Given a build break that requires investigating the target dependency graph, what's a good way of doing it?

For example, given the project:

```xml






```

Assuming that there's many targets, and it's not obvious how target `A` gets to execute given the entry target `D`, there's no good way of seeing the D->C->B->A chain. The logs don't say anything about `C`

Text log:
```
18:12:24.899 1>Target "A: (TargetId:2)" in project "E:\delete\cannotTellOrder\build.proj" (target "B" depends on it):
Using "Error" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Error" (TaskId:2)
Task Parameter:Text=error (TaskId:2)
18:12:24.913 1>E:\delete\cannotTellOrder\build.proj(3,9): error : error
Done executing task "Error" -- FAILED. (TaskId:2)
18:12:24.913 1>Done building target "A" in project "build.proj" -- FAILED.: (TargetId:2)
18:12:24.914 1>Done Building Project "E:\delete\cannotTellOrder\build.proj" (default targets) -- FAILED.
```

Binary log:
![image](https://user-images.githubusercontent.com/2255729/66692422-0f9e8b00-ec53-11e9-88bd-d6976e812e37.png)

One solution is to print out the remaining target stack whenever a target fails.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.