Circular dependency error should include more information.
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 133
Description
When this throws, the error is fairly inscrutable:
https://github.com/Microsoft/msbuild/blob/951b2f068956429acf8ad283034f1031bbcf80f0/src/Build/BackEnd/Components/RequestBuilder/TargetBuilder.cs#L702-L714
It just says
```
error MSB4006: There is a circular dependency in the target dependency graph involving target "PrepareProjectReferences".
```
That's not very easy to find and fix.
We could keep a list of parents so that we could say something like
```
There is a circular dependency in the target dependency graph involving target {targetSpecification.TargetName}. Target {parentTargetEntry} has a {buildReason} dependency on it, but it is depended upon by {string.Join("<-", listOfParents)}.
```
Maybe only at higher verbosities.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.