MSBuild ITaskItem/TaskItem should be able to report an IElementLocation or similar to aid diagnostics
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Summary
Today ITaskItem/ITaskItem[] passed into a Task do not carry Location information, which means that when reporting diagnostics _based_ on the content of those ITaskItems the Task cannot directly point the user to the source of the diagnostic. This makes it hard to trace faults for things like malformed PackageVersion Items, or typo'd PackageReferences.
### Background and Motivation
We want to enable Task authors to efficiently point users to the source of problems to speed up the fix cycle.
### Proposed Feature
We add a `Location` nullable member to our Task interfaces via a way that is to be designed, and we start populating that information on ITaskItem instances that are backed by actual XML elements in MSBuild logic files. Users that explicitly create TaskItem instances should also be able to set Location information.
### Alternative Designs
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.