Include NuGet.Packaging in ApiCompat.Task package #35507
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue raised #35467 (comment)
The SDK will filter which references will actually publish when
PrivateAssets
is set, but only for direct references. Here's that feature:sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Shared.targets
Lines 50 to 60 in 8dfacad
I'm not sure I really agree with that behavior -- since all the transitive references are still Private, but not filtered -- but it is what it is. This explains why the project previously set
Publish
metadata.Here's the diff after this change, compared to the latest RC2 package: https://www.diffchecker.com/fmxLyhv6/
The removal of NuGet.Protocols and its closure is expected. Nothing was using that anymore after we removed the task that fetched the latest version from NuGet long ago. I intentionally dropped this in the original PR. There are no assembly references to this assembly in the task or its dependencies.