Nuget TFS2010 build issue

Topics: General
Jun 22, 2012 at 5:32 PM

Hi,

I can't get my TFS2010 restore packages when I run a build. Everything works fine locally, i.e. if I drop the packages directory, It gets to downloaded again when I build. 

But when I launch a build on TFS, I get an error message as if I tried to download something from nuget.org. It shouldn't be required since my feed is a local one. Note that I properly configured the PackageSource parameter in the NuGet.targets file. Furthermore, I got a .nuget folder at the root of the solution with NuGet.exe in it which is commited in TFS.

What am I missing here ?

Thanks

Jun 25, 2012 at 9:02 AM
Edited Jun 28, 2012 at 7:37 AM

Hi,

I'm pretty much facing the same problem.

As Alex, I've got a file share we're I keep my packages, so TFS need not go online (TFS service account has the appropriate permissions). The feed is configured in the <PackageSources> as follows:

 

<PackageSources>"file://MyNetworkPath/NuGet%20Packages/"</PackageSources>

 

The build error feedback is not very useful:

 

E:\Builds\2\Validation Installation\RestoreTest\Sources\.nuget\nuget.targets (58): One or more errors occurred.
E:\Builds\2\Validation Installation\RestoreTest\Sources\.nuget\nuget.targets (58): The command ""E:\Builds\2\Validation Installation\RestoreTest\Sources\.nuget\nuget.exe" install "E:\Builds\2\Validation Installation\RestoreTest\Sources\packages.config" -source "file://MyNetworkPath/NuGet Packages/" -o "E:\Builds\2\Validation Installation\RestoreTest\Sources\packages"" exited with code 1.

 

So, same question as Alex; what are we missing?

Regards,

F.

Jun 26, 2012 at 1:33 PM

After some research, it appears that the nuget.exe executable created in the .nuget folder is just an "updater", which looks for the most recent version of nuget on nuget.org and then install it dynamically. My server doesn't have an internet access, is there a way to work with nuget server-side in an offline scenario ?

Developer
Jun 26, 2012 at 3:08 PM

You should replace the bootstrapper with the full exe (https://nuget.org/nuget.exe). I guess we need a better way of presenting this fact to you - that package restore would require access to the internet to work correctly. Somebody filed a bug for this issue today - http://nuget.codeplex.com/workitem/2390

@cordifed - I don't think you're running into the same issue as Alex. I'm not entirely sure, but could you try replacing the file:// path with a UNC path \\MynetworkPath\NuGet Packages? Might be a bug in how we treat file:// paths. Also, the next version of NuGet.exe spits out more useful error messages

Jun 26, 2012 at 3:23 PM

I don't think we should require internet access for package restore. What was the reason to replace nuget.exe with the boostrapper?

Jun 28, 2012 at 8:27 AM

@pranavkm

It appears the using an UNC gives me another error. I'll post this in another thread though, since it does not appear to be related to the online/offline issue.

On the topic of the internet access, I agree with dotnetjunky that this should not be required, since many build servers (TFS and others) don't have this type of connectivity.

Jun 28, 2012 at 8:27 AM

@pranavkm

It appears the using an UNC gives me another error. I'll post this in another thread though, since it does not appear to be related to the online/offline issue.

On the topic of the internet access, I agree with dotnetjunky that this should not be required, since many build servers (TFS and others) don't have this type of connectivity.

Jun 28, 2012 at 8:27 AM

@pranavkm

It appears the using an UNC gives me another error. I'll post this in another thread though, since it does not appear to be related to the online/offline issue.

On the topic of the internet access, I agree with dotnetjunky that this should not be required, since many build servers (TFS and others) don't have this type of connectivity.

Developer
Jun 28, 2012 at 3:56 PM

@cordified, there's an ongoing discussion about the need to access the internet at http://nuget.codeplex.com/workitem/2390. Feel free to chime in there.