❔ Make package C private in project A, which inherits project B which uses package C
I have 2 projects, project A and B.
project A inherits project B (dependency).
however, I want project A to not be able to see project B's NuGet package.
3 Replies
I have tried doing the following in project B's config (PrivateAssets = "All"):
however, it throws
System.IO.FileNotFoundException: 'Could not load file or assembly
exception, meaning that the package is not being placed with project A's build. I am (obviously) running from project A.
Update: I replaced PrivateAssets="All"
with PrivateAssets="compile"
. Is it a good solution?There is more to it, there are these in addition to PrivateAssets, look up the documentation
chatgpt might be able to generate you a few examples, maybe just paste the documentation page to it and ask for examples
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.