Skip to content

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Dec 31, 2025

We can end up with duplicated items if they exist both in child projects as well as in the current project that we are building. These end up added to ResolvedFileToPublish and later on passed to crossgen2, which doesn't accept duplicate assembly inputs.

We can end up with duplicated items if they exist both in child projects as well as in the current project that we are building. These end up added to `ResolvedFileToPublish` and later on passed to crossgen2, which doesn't accept duplicate assembly inputs.
Copilot AI review requested due to automatic review settings December 31, 2025 11:32
@BrzVlad BrzVlad requested review from a team as code owners December 31, 2025 11:32
@BrzVlad
Copy link
Member Author

BrzVlad commented Dec 31, 2025

Not entirely sure if this is the right fix since I don't have experience in the area. Obviously this could also be fixed at the level of the ready to run command but handling it here seemed more appropriate. For a more detailed description of the issue and a simple repro see https://github.com/BrzVlad/repros/tree/main/composite-r2r-publish.

Issue encountered while working on composite R2R configuration for BenchmarkDotNet.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds duplicate prevention for _NoneWithTargetPath items when copying to the publish directory. The changes prevent duplicate entries that can occur when items exist in both child projects and the current project, which would later cause crossgen2 to fail when it receives duplicate assembly inputs.

Key changes:

  • Add KeepDuplicates attribute to three _NoneWithTargetPath ItemGroup declarations
  • Use the existing _GCTPDIKeepDuplicates property (set to false) to control deduplication behavior
  • Follow the same pattern already applied to child project items from _AllChildProjectPublishItemsWithTargetPath

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.

2 participants