I'm looking for a way to 'privately' reference an MSBuild project so that it won't be shown to the user of the NuGet package. For example, suppose I have two libraries, LibFoo and LibBar. They're organized under a single solution, like this:
Foobar.sln
|
---- LibFoo.csproj
|
---- LibBar.csproj
Now, suppose LibFoo references LibBar. When I go to build LibFoo, LibBar is built as well. The resulting binaries are both included in LibFoo's output directory. When I nuget pack them and include everything in the directory as part of the NuGet package, LibBar's binaries are included as well.
Finally, when the end-user installs LibFoo, NuGet goes ahead and references everything in the package, including LibBar.
Is there any way to prevent this from happening?