Attilah
Attilah

Reputation: 17932

TFS Build doesn't download missing NuGet packages

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 ?

Upvotes: 8

Views: 8746

Answers (2)

VictorySaber
VictorySaber

Reputation: 3164

To build upon what John Korsnes says above in his comment (because that alone wasn't enough to resolve my issue), from NuGet 2.7 you don't need to explicitly enable package restore as it is on by default. For my project I was getting missing references (notably "The type or namespace name 'Optimization' does not exist in the namespace 'System.Web'").

The resolution to the problem was to go to Source Control Explorer and delete the \packages folder. I checked in the change and queued up another build. This took a while as the build server downloaded the packages, but the build completed successfully.

Upvotes: 3

Radoslav Minchev
Radoslav Minchev

Reputation: 161

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

Upvotes: 8

Related Questions