dotnet / dotnet/msbuild

Mapping of missing .targets files with Visual Studio workloads

Open
#9,696 0 comments 1 reaction 0 assignees View on GitHub
Area: Debuggability backlog triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Mapping-of-missing-targets-files-with-V/1649929)._

---
When trying to build something using msbuild, and you get an error message saying the *.targets file could not be found, it would be super helpful if the error message could also contain the information about which workload (component ID) that need to be installed in order to be able to get the .targets file in place (i.e. to be able to build the target).

The current behavior is far from optimal, since the .targets file name is not mapping 1:1 to a component ID and there is no public list of what component ID installs what .targets file, so you're basically forced to do trial and error, installing every likely candidate component ID (one at a time, check if the .targets file was installed and if it wasn't, remove the candidate again and move on to trying the next one).

Maybe I have missed some really basic thing here that could help me out with this? Please note that this is a matter of managing a whole set of build machines, not using the Visual Studio IDE, so using the IDE is not the answer, and not an option here. And I'm also aiming at having an as slim installation of VS as possible, meaning - I don't want to install a lot of unnecessary workloads just because I don't know which one installs which .targets file. A proper solution to this would be great :)

Thank you for your understanding and help!

---
### Original Comments

#### Feedback Bot on 1/29/2022, 08:36 AM:

(private comment, text removed)

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.