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.
A good rule of thumb that addresses both of these issues is to always manage packages at the solution level. Right-click on the Solution node in the Solution Explorer and select Manage NuGet packages for Solution.
nuget.exe pack -IncludeReferencedProjects -properties Configuration=Release Using these options, Nuget will create a.nupkg that includes any referenced packages and projects. The package filename is automatically created, using the format [package id]. [package version].nupkg
A global NuGetDefaults.Config file also specifically configures package sources. Settings apply to all commands issued in the CLI, the Package Manager Console, and the Package Manager UI. Config file locations and uses Notes for earlier versions of NuGet:
1) Copy your nuget packages into the new folder you created. 2) Open Visual Studio, and click Tools | Nuget Package Manager | Package Manager Settings. 3) Click Package Sources. 4) Add your newly created folder - you MUST fully qualify the path.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With