dotnet / dotnet/project-system
Skip missing DTB targets
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
We’ve had a few discussions with partner teams recently around errors caused by missing DTB targets in their customised build environments.
The recent addition of target `GetPotentialEditorConfigFiles` to MSBuild has caused at least two teams to get into trouble. It turns out this target just returns a list of items, so if the target is missing it could be considered that the list is empty.
MSBuild does support skipping missing targets (added in https://github.com/microsoft/msbuild/pull/2541).
The project system should avoid breaking DTB for customers with heavily customised build chains that fall out of date with VS’s expectations.
(Discussed offline.)
@lifengl wrote:
> You will have to do it in two places. When the project is dirty, CPS issues the build request (inside `BuildProject.cs`), and when it is not, CPS is using DTBB to [schedule builds](http://index/?leftProject=Microsoft.VisualStudio.ProjectServices&leftSymbol=avokfrapgqlb&file=DesignTimeBuild%5CDesignTimeBuildScheduler.cs&rightSymbol=qge3txkzgvwc). Note: both CPS and traditional project uses DTBB to build, so it is possible that you need expose it as an option to its caller. In which case, you need update the DTBB first, and then update CPS.
@davkean wrote:
> I think we’d want to enable it for legacy anyway – it’s often the one that runs into it.
Contributor guide
Assessment
This issue has not been assessed yet.