-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix package reference pack when referenced directly and indirectly
Because of the way we were constructing the `_PrivateAssets` and `_ShouldPack` properties, we were ending with duplicates (i.e. `all;all`) if the package reference was both direct and indirectly included, since the previous item transform would basically concatenate all such values, breaking the condition in the subsequent item group. Rather than using an item transformation, we now instead just reference the item metadata directly, which will result in MSBuild iterating all items and assigning the property multiple times, once for each item. The last such item will determine the final property value. Therefore, we invert the Implicit references so they are processed first, so that an explicit `PackageReference.PrivateAssets` or `Pack` metadata trumps implicitly defined reference values. A new test ensures this is the case (it would fail without the fix) with the Shell.Interop VSSDK package. Fixes #28
- Loading branch information
Showing
2 changed files
with
56 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters