Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drewnoakes opened this issue Mar 9, 2023 · 2 comments
Assignees
Projects

Comments

@drewnoakes
Copy link
Member

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.

@jeffkl jeffkl added this to To do in NoTargets via automation Mar 9, 2023
@jeffkl
Copy link
Contributor

jeffkl commented Mar 9, 2023

Thanks for reporting @drewnoakes. Do you see anything obvious in the NoTargets logic that would be causing this?

https://github.com/microsoft/MSBuildSdks/tree/main/src/NoTargets/Sdk

@jeffkl jeffkl self-assigned this Mar 9, 2023
@drewnoakes
Copy link
Member Author

@jeffkl nothing jumps out at me. Diffing binlogs of a bare project with a single project reference to a NoTargets vs. a regular SDK project should reveal the issue. You might like to copy this target into the referencing project and ensure it's executed, then work back from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
NoTargets
  
To do
Development

No branches or pull requests

2 participants