Why doesn't nuget include the referenced project when packing?

nuget

Solution

NuGet 2.5 now has a `-includereferencedprojects` option, more details can be found here : NuGet Command-Line Interface (CLI) Reference | Microsoft Docs I download the latest version of `nuget.exe` from `nuget.org/nuget.exe` or by `nuget update -self`.

Problem

I have reproduced this issue in the following simple scenario - LibB - project - ClassB - LibA - project - ClassA that references ClassB Now I want to create a nuget package of `LibA` and run: ``` nuget pack LibA.csproj ``` This works fine, but when I check the nuget package I can't find a `LibB.dll` in the lib folders as I expected. Why not? I'm using version 2.2 of Nuget.

Original source