Visual Studio: managing NuGet packages in nested solutions

For one client I had to solve the problem of NuGet packages in nested solutions, where piratically there is one big solution file (used mainly by the build server) and many other nested solutions used by the various developer teams.

The solution in Nuget with multiple nested solutions simply works, but it uses an absolute path, so there can be issues when using the solutions from different machines (developer configurations, build server, and so on). The goal is to use relative paths.

Another long thread is Setting up a common nuget packages folder for all solutions when some projects are included in multiple solutions and it shows multiple alternative (even because meanwhile the tools has improved so many steps are no more necessary).

One example of configuration file can be downloaded here: NuGet.config (514B)

The only important things to note are:

  • the packages paths are relative to the .nuget folder