Skip to content

Conversation

@vikukush
Copy link
Contributor

@vikukush vikukush commented Dec 17, 2024

When GetCopyToPublishDirectoryItems from Microsoft.NET.Publish.targets is called on its own, the depends tree terminates at _SplitProjectReferencesByFileExistence
_SplitProjectReferencesByFileExistence tries to use @(ProjectReferenceWithConfiguration) , which is empty, because it is emitted by AssignProjectConfiguration, which isn't actually called.
This causes the Publish action to not pick up output of project's ProjectReferences, since they are completely ignored.

Failed call missing projectreferences, AssignProjectConfiguration is not called:

image

Normal call as part of Publish, AssignProjectConfiguration runs as a dependency of ResolveReferences:

Screenshot 2024-12-18 111137
image

Add the target to the dependson list to ensure that @(ProjectReferenceWithConfiguration) contains something and all projectreferences output is picked up as expected.

@vikukush
Copy link
Contributor Author

@dsplaisted , @rainersigwald , I've added better screenshots explaining the issue, check it out

Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@JanProvaznik JanProvaznik merged commit 1c27ccf into dotnet:main Mar 17, 2025
10 checks passed
@vikukush vikukush deleted the patch-3 branch March 17, 2025 16:20
@JanProvaznik
Copy link
Member

/backport to vs17.14

@github-actions
Copy link
Contributor

Started backporting to vs17.14: https://github.com/dotnet/msbuild/actions/runs/14040120899

rainersigwald pushed a commit that referenced this pull request Jun 19, 2025
…2035)

Revert #11167 because it caused breaks (unexpected transitive closures in some situations)
in several user scenarios.
This was referenced Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants