Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS Build doesn't download missing NuGet packages

Tags:

.net

tfs

tfsbuild

I've been trying to setup my build server (Team Foundation Service) to automatically download 3rd party libraries and successfully build, but I don't know how to do this.

Is there a way ?

like image 652
Attilah Avatar asked Jan 27 '13 18:01

Attilah


People also ask

How do I allow NuGet to download missing packages?

To do that, go to Tools, NuGet Packaged Manager, then go to Package Manager Settings. Go to the General section, and then make sure you have a checkmark for Allow NuGet to download missing packages and also to automatically check for missing packages during the build in Visual Studio. So click on OK.

How do I force a NuGet package to install?

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.

What is NuGet restore in TFS build?

We use most is Nuget restore in TFS build definition. To promote a cleaner development environment and to reduce repository size, NuGet Package Restore installs all a project's dependencies as listed in either the project file or packages.config .

How do I force a NuGet package to restore?

Restore NuGet packagesNavigate to Tools > Options > NuGet Package Manager > General, and then select the Allow NuGet to download missing packages check box under Package Restore. Enabling Restore NuGet Packages. In Solution Explorer, right-click the solution, and then select Restore NuGet Packages.


1 Answers

you need to enable package restore for the solution you want to build on the build machine. This is at least what I did to get NuGet to work with Team build. Here's a link about package restore and how to use it during build http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages

like image 168
Radoslav Minchev Avatar answered Sep 28 '22 05:09

Radoslav Minchev