How to trigger NuGet v2.x Package Restore from CruiseControl.Net

cruisecontrol.net, msbuild, nuget, visual-studio-2010

Solution

from http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages To enable package restore for build servers without Visual Studio installed, you can also set the environment variable EnableNuGetPackageRestore to "true".

Problem

Is it possible to trigger a NuGet v2.x package restore when trying to build a VS2010 solution using CruiseControl.Net? We've recently set up CCNET and are simply trying to trigger a test build of our main solution. Many projects within the main solution have NuGet package restore enabled. The packages folder is not committed to our VCS. Because of the new "feature" of having to consent to the package restore in Visual Studio, MSBuild is failing when it hits the restore package target in the nuget.targets file. If it is possible without drastic changes to every project that uses NuGet or to write a custom build script, what is the best way to accomplish the package restore?

Original source