Solution wide packages

Topics: General
May 14, 2012 at 8:01 AM

Hi

I might have missed anything obvious but... What's the use of the solution\.nuget\packages.config file?

I thought I could point references there that's not used by any csproj (eg build dependencies) that would be downloaded/installed whenever the solution file was build. This seems not be the case.

In my case, I need the CI machine to have access to nunit-console.exe which is part of the nunit-runners package. No cs-proj needs this reference. I have tried....

1. Enable nuget package restore
2. Added nunit-runners package on solution level only

The 2. downloads the package one time only. If the package folder later is removed, the package won't be downloaded again. When looking at the sln source file, this is quite obvious - there is no code there that does nuget stuff.

 

So my questions are...

1. What is the use of the [solution]\.nuget\packages.config file?
2. How can I use nuget to install packages not references by any c#-project in the solution? Do I have to write manual build script for this?

Thanks
Roger