When building project in TFS get the following error in the Application log.
Please note that the version in the error below is from older version of nuget but getting the same error with 2.8.2
Faulting application name: NuGet.exe, version: 2.8.50506.491, time stamp: 0x5368b20c
Faulting module name: NuGet.exe, version: 2.8.50506.491, time stamp: 0x5368b20c
Exception code: 0xc0000005
Fault offset: 0x00197502
Faulting process id: 0xeac
Faulting application start time: 0x01cfcde8a9d02d73
Faulting application path: [DRIVE]:[CAT][DOG][SOURCE][TOOLS]\nuget\NuGet.exe
Faulting module path: [DRIVE]:[CAT][DOG][SOURCE][TOOLS]\nuget\NuGet.exe
Report Id: e783e05f-39db-11e4-80c0-001b78715e5c
Faulting package full name:
Faulting package-relative application ID:
Error in TFS is (Please note I have changed names and paths for security reasons):
[DRIVE]:[CAT][DOG][SOURCE][TOOLS]\nuget\nuget.targets (91): The command ""[DRIVE]:[CAT][DOG][SOURCE][PRO][C-FOLDER][S-FOLDER][STUFF]........[TOOLS]\nuget\nuget.exe" install "[DRIVE]:[CAT][DOG][SOURCE][PRO][C-FOLDER][S-FOLDER][U-FOLDER]\packages.config"
" -RequireConsent -o "[DRIVE]:[CAT][DOG][SOURCE][PRO][C-FOLDER][S-FOLDER]\packages""
exited with code 255.
Description of issue:
When running a build through TFS 2012 UP4 all servers are running Windows 2012 R2 with latest patches the build fails sometimes with the error above. The build account has local admin rights on the build server, there is only one build agent on the build server.
The server is a physical box not VM. The other TFS servers are VMs.
When I run msbuild.exe MyProject.proj from the command line on the build server the build never raises an error. The condition only happens when I run the build through the build process in TFS. I have rebooted the server and confirmed that the account has
full access to the system and the Build Service is running with the same account that has local admin rights to the server.
When I log into the local server and run msbuild.exe MyProject.proj I use the same account that the build service is running under. The error seems to happen randomly. Run the build 4 or five times and half the time the build fails.
I do not see this issue when running the build on a Windows 2008 R2 server with the same configuration. Also the nuget.exe is stored in source control so it comes down with the rest of the source code when the build runs it is not stored locally on the server.
All servers are also on the same domain and same subnet if that helps.
Any ideas would be greatly appericated. I also have a ticket open with Microsoft so if I am able to figure out what the issue is I will post the solution here.