dotnet / dotnet/sdk

Introduce a 'PackPrivate' mechanism for private project reference packing

Open
#47,066 4 comments 4 reactions 0 assignees View on GitHub
Area-NetSDK
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

Context:
https://github.com/nuget/home/issues/3891

What I ideally want to see is a mechanism that:
- Allows dependencies to flow transitively in builds (so I don't need to redefine references in test projects and so on, today PrivateAssets=All disables transitive flow).
- Disables transforming project references into nuget package dependencies (PrivateAssets=All also affects this part today).
- Packs the outputs of the project into the package without needing to include all kinds of target magic (see https://github.com/NuGet/Home/issues/3891#issuecomment-2533063892).

As I understand it PrivateAssets is overloaded and combines local reference semantics with packaging behaviors, this is problematic. Additionally, due to the complexity of the restore phase (assets.json etc) it seems impossible to create these kinds of PackPrivate features outside of the sdk while achieving good integration. I just don't believe the hooks are there to do so.

Related:
- https://github.com/search?q=TargetsForTfmSpecificContentInPackage+WithMetadataValue%28%27PrivateAssets%27%2C+%27All%27%29&type=code&p=1
- https://github.com/NuGet/Home/issues/3891

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.