1

We currently utilize Team-city 8 for continuous integration. We recently made changes to how we handle projects that depend on various nuget packages. Initially, we would check all nuget dependencies into source control, but we decided to not do this anymore and instead enable package restore so that on build, the required packages are downloaded.

However , we are getting errors which suggest that the nuget packages cannot be found which makes sense as we haven't set a default nuget version on teamcity with no nuget installer build step.

I presume it is required that the server that hosts teamcity should be able to connect to the internet. What is the alternative if we cannot connect to the internet on the server? Is there an alternative way to deal with projects with multiple nuget packages ?

See the image below regarding teamcity's nuget settings.

enter image description here

lacoder
  • 1,253
  • 1
  • 11
  • 22

1 Answers1

2

Login as Administrator and go into Administration in left pane you will see Integrations section, select NuGet Settings, select nuget.exe tab and then click fetch nuget and then select option Set ase default

In your case you just have to fetch it and set it as default.

Here's an image

enter image description here

Dejan Dakić
  • 2,418
  • 2
  • 25
  • 39
  • Many thanks Dejan, I tried this but received an error which seemed to suggest that nuget.org could not be connected to. This means we need to sort out internet connectivity on the server machine that hosts teamcity, or is there another way? – lacoder Sep 04 '14 at 11:22
  • If you dont have internet connection, how will you restore packages (are all your packages internal?) if so, you could "hack it" by modifying etc/hosts file and redirect nuget.org to your internal server, but please dont do that, just connect server to the internet and fetch 2mb exectuable, you can then remove internet access on this server. – Dejan Dakić Sep 04 '14 at 11:22