Packages fails to download when using msbuild.exe

Topics: General
Mar 4, 2013 at 9:07 AM
Hi,

I have converted all my solutions/projects to use NuGet.
When I open a solution using visual studio and rebuild it, everything works perfect.
I'm using Jenkins as my build software and when I use msbuild.exe to compile my solution, sometimes it fails to download packages. Not all the packages that are needed by the project but some succeeds and some fails (I couldn't find a certain pattern).

When I log into the build server and run msbuild.exe from command line it sometimes fails and sometimes succeeds.

Thanks
Gil
Mar 4, 2013 at 1:25 PM
Edited Mar 4, 2013 at 1:25 PM
Hi,

After farther investigation I have gotten to the temporary conclusion that packages fails to download only for the first time.
If I use devenv.com, all packages are being downloaded. Then, if I remove all packages from the solution's packages folder and run the solution using msbuild.exe, all works fine.
My assumption is that when using devenv.com or devenv.exe (VS UI), something is running in the background that allows these packages to download.
I really have no idea what would that be.

Any help will be appreciated

Thanks
Gil
Mar 4, 2013 at 3:16 PM
Edited Mar 5, 2013 at 7:58 AM
Duplicate
Mar 4, 2013 at 5:32 PM
I'm not familiar with Jenkins. Perhaps it has some log file that can help you diagnose the problem? If you open Fiddler, do you see network traffic the first time you build?
Mar 5, 2013 at 7:52 AM
Edited Mar 5, 2013 at 7:58 AM
Duplicate
Mar 5, 2013 at 7:57 AM
dotnetjunky wrote:
I'm not familiar with Jenkins. Perhaps it has some log file that can help you diagnose the problem? If you open Fiddler, do you see network traffic the first time you build?
dotnetjunky, do you happen to know why are my messages being duplicated?

As for your answer, as I wrote in my second message, it has nothing to do with Jenkins.
I'm now dealing only with the differences between msbuild.exe and devenv.com/devenv.exe.
Moreover, even if I run the nuget install command in a dos window, I get the same results:
Unable to find version '<package version>' of package '<package name>'.

Thanks
Gil
Mar 5, 2013 at 2:14 PM
OK,

Found the issue. It is related to a NuGet probable bug that I have opened a thread about (http://nuget.codeplex.com/discussions/433688).
For some reason, any NuGet command that I run (update, install, push, etc') needs to get the -Source flag. Otherwise, it refers to the NuGet official gallery.
I have configured all configuration files to use my local feed only (%AppData%\nuget\nuget.config and $(solutionDir).nuget\nuget.config).

Thanks
Gil