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

Include NuGet.Packaging in ApiCompat.Task package #35507

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Sep 19, 2023

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:

<Target Name="_ComputePackageReferencePublish">
<ItemGroup>
<!-- PrivateAssets="All" means exclude from publish, unless Publish metadata is specified separately -->
<PackageReference Publish="false"
Condition="('%(PackageReference.PrivateAssets)' == 'All') And ('%(PackageReference.Publish)' == '')"/>
<_ExcludeFromPublishPackageReference Include="@(PackageReference)"
Condition="('%(PackageReference.Publish)' == 'false')" />
</ItemGroup>
</Target>

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.

@ericstj ericstj requested a review from a team as a code owner September 19, 2023 00:45
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Sep 19, 2023
@ViktorHofer ViktorHofer merged commit 8114042 into dotnet:main Sep 19, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants