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

Microsoft.Common.CurrentVersion.targets: _SplitProjectReferencesByFileExistence DependsOn AssignProjectConfiguration #11167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vikukush
Copy link

@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
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!

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

Successfully merging this pull request may close these issues.

2 participants