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?
Restore packages manually or automatically After you enable package restore in Options, you can right-click the solution in Solution Explorer and select Restore NuGet Packages to restore packages anytime.
Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.
In Tools -> Options -> NuGet Package Manager -> General you need to select the "Allow NuGet to download missing packages" option which allows NuGet to restore and the "Automatically check for missing packages during build in Visual Studio" which enables on build restore.
Package Manager console (Visual Studio, Tools > NuGet Package Manager > Package Manager Console): Run the Update-Package -reinstall -ProjectName command where is the name of the affected project as it appears in Solution Explorer. Use Update-Package -reinstall by itself to restore all packages in the 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".
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