microsoft / microsoft/CsWinRT

Bug: Copy Local (Private) not respected for project references

Open
#2,015 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
665
Forks
134
Avg merge
1d 3h
Merged PRs (30d)
32

Description

Description

The target CsWinRTRemoveWinMDReferences removes the project referenced .winmds from ReferencePath and puts their implementation (if present) in the ReferenceCopyLocalPaths. This does not respect the "Copy Local" (Private) value as set for the project reference.

Steps To Reproduce
  1. Create authoring project A
  2. Create consuming project B
  3. Reference A from B
  4. Set "Copy Local" -> "No" in VS (or <Private>false</Private> in the ProjectReference)
  5. Build, note that the implementation binary A will be placed in the output for B
Expected Behavior

Outputs of project A should not be placed in the outputs of project B when these properties are set.

Version Info

CsWinRT 2.1.6

Additional Context

No response

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 at the CsWinRTRemoveWinMDReferences target and trace how referenced .winmd implementations are added to ReferenceCopyLocalPaths. Check how the ProjectReference Private value is handled, then reproduce with authoring project A and consuming project B using false. Done means A's implementation binary is absent from B's output when Copy Local is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.