Skip to content

Consider Enhancing MSB5009 To Indicate Which Project Was Incorrect #4836

@aolszowka

Description

@aolszowka

MSBuild can throw MSB5009 from this piece of code:

https://github.com/microsoft/msbuild/blob/e0116872ef1bf48f1f527d69de64ad58cb7453e0/src/Build/Construction/Solution/ProjectInSolution.cs#L371-L372

Please consider throwing the project name or at very least ParentProjectGuid of the invalid project. It would assist those trying to find the invalid project (and would have made discovery of #4835 much easier).

As it stands the best way (beyond looking at the VCS History to figure out how it was introduced) is to attach the debugger, capture the exception, and then investigate this to determine the project, from there you can work backwards to the GUID in question.

Metadata

Metadata

Labels

Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Area: Solution (.sln)Issues related to parsing .sln files or building solutionstriaged

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions