Pinzi
Pinzi

Reputation: 293

CruiseControl.NET NuGet not working

My CruiseControl.NET build server is not able to restore the nuget packages of my projects. According to some websites it should be enough to set the environment variable EnableNuGetPackageRestore to "true" and restarted Cruise Control after that, but that didn't help in my case.

What else can I do? Do i need to install something that "enables" Nuget?

I noticed I have a .nuget folder in C:\Users\MyUser\ but I don't have this folder on the build server. Is this required? Who created that on my pc? Visual Studio?

Upvotes: 1

Views: 886

Answers (1)

Roy Folkker
Roy Folkker

Reputation: 427

Without seeing the project config, I am assuming you are using either a Microsoft Solution or project, and are building from that using the msbuild task in CC.net. If so, your Solution needs a .nuget folder structure (in the same location as the sln/prj file there needs to be a .nuget folder, inside that folder, you need a NuGet.Config and a NuGet.exe as well as a NuGet.targets).

This should be automatically added to your solution if you right click on it inside visual studio and select "Enable nuget Package Restore".

You can find more information @ Nuget Documentation. There is quite a few ways to skin this cat, but, based on your initial statement, you are just missing the .nuget folder in your Solution, and once added it should just work. Otherwise, you have to look at pre-build tasks, and that gets a little more detailed than is usually necessary.

Upvotes: 1

Related Questions