I have a solution where I want to create a NuGet package from two of the projects.
If it were just one project, I'd use the .csproj file to spec the NuGet packager, but since I want two different projects to go into the finished package, I can't do that.
I created a NuSpec file that referenced the DLLs from the two projects, and then packed it with the -IncludeReferencedProjects switch in the command line. This included the referenced projects from the same solution, but not any NuGet packages that were dependencies in the projects.
I tried referencing the new NuGet package in another solution, and the solution built and run, but encountered a FileNotFoundException at runtime when it was looking for the DLL from the NuGet packages that were dependencies in the NuGet package I just created.
I realize that I could include the NuGet dependencies in the NuSpec file, but that will become outdated the moment one of my projects adds another NuGet reference.
Is it possible to set up a NuSpec file so that it uses the .csproj files from both my projects and sets up the NuGet dependencies correctly, even when the projects are updated with new NuGet dependencies?