C
C#2mo ago
Nolram

NuGet Private Assets not allowing access as dependency

I have one application that depends on another project. That project uses a NuGet Package. I want that NuGet package to only be availble for that core library to actually use; however, I still need it to be available as a dependency for the application.
<PrivateAssets>all</PrivateAssets>
<PrivateAssets>all</PrivateAssets>
seems to actually not even allow usage as a dependency... But in reality I just want the package to not be exposed directly to the programmer when working on the actual application. Any ideas?
3 Replies
wasabi
wasabi5w ago
There isn't a way to do this in my experience.
Nolram
NolramOP4w ago
.. then how is PrivateAssets meant to be used at all? Since any code that would depend on any other code that is using a private asset won't compile
wasabi
wasabi4w ago
There are other assets delivered by nuget files where it makes sense: build scripts, source imports, etc.

Did you find this page helpful?