I have reproduced this issue in the following simple scenario
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.
-includereferencedprojects
nuget.exe
nuget.org/nuget.exe
nuget update -self