microsoft / microsoft/MSBuildSdks

[NoTargets] Projects referencing a NoTargets project do not see ResolvedProjectReference items

Open
#426 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
508
Forks
94
Avg merge
6h 40m
Merged PRs (30d)
2

Description

In VS, the dependencies tree relies on the design-time build producing resolved items for a projects references in order to display them as resolved in the tree.

When a project references a NoTargets project, it does not see such a resolved item and hence the yellow triangle in the dependencies tree in solution explorer remains visible:

image

The dependencies tree obtains these items from this target:

https://github.com/dotnet/project-system/blob/eb4e01a2d65fae7b0d466718356e7b9c5a175dcd/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.Managed.DesignTime.targets#L389-L408

Something about the NoTargets project means that this reference is not handled by this target.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the NoTargets project reference in Visual Studio and inspect Microsoft.Managed.DesignTime.targets at the linked resolved-items target. Compare the design-time build output for ordinary and NoTargets references. Done means the dependency is emitted as a resolved item and the yellow triangle no longer appears in Solution Explorer.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.