19

How do I create a solution-level NuGet package. That is, one that does not touch any projects, and is listed in .nuget\packages.config (not in any project-level packages.config files).

For example, psake and RavenDB.Server are solution-level NuGet packages.

I can't find anything in the docs for .nuspec files or nuget.exe that says anything about solution-level packages. I can't find anything special in the build processes of those two projects when they call nuget pack. In fact, I can't find a single search result at all about creating solution-level packages.

jtbennett
  • 288
  • 2
  • 8

1 Answers1

12

I found a brief comment from Phil Haack. It's from an issue on CodePlex:

We already support this. Just don't put any content in the /Content folder nor in the /Lib folder. If your package only has contents in the /Tools folder, the package will not get installed in the project.

Haven't had a chance to test this out, but it sounds like what you're looking for. A quick peek into the RavenDB.Server package (rename .nupkg to .zip) reveals a setup that is consistent with what Phil said in his comment. No content folder, no lib folder. Lots of files. The files are not in a /tools folder, so I think it's safe to presume that's not a requirement.

John Nelson
  • 5,041
  • 6
  • 27
  • 34