This project is read-only.

TFS Build Failed to Update the Nuget Pacakge

Jul 17, 2013 at 11:59 AM
When i try to build the code without commiting the package using Nuget.Exe it is working fine.
when i try to build the same code using TFS Build i am getting the below error.
I have enable the download missing package option in visual studio on build server but still it doesnt works.

can any one help me out on this ...

C:\Builds\3\User Requiremetns Tests\UserRequirement\src\User Requiremetns Tests.nuget\NuGet.targets (89): Package restore is disabled by default. To give consent, open the Visual Studio Options dialog, click on Package Manager node and check 'Allow NuGet to download missing packages during build.' You can also give consent by setting the environment variable 'EnableNuGetPackageRestore' to 'true'.
C:\Builds\3\User Requiremetns Tests\UserRequirement\src\User Requiremetns Tests.nuget\NuGet.targets (89): The command ""C:\Builds\3\User Requiremetns Tests\UserRequirement\src\User Requiremetns Tests.nuget\NuGet.exe" install "C:\Builds\3\User Requiremetns Tests\UserRequirement\src\User Requiremetns Tests\Eurofins.Tfs.Test.HelloWorldApplication\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Builds\3\User Requiremetns Tests\UserRequirement\src\User Requiremetns Tests\ " " exited with code 1.
Jul 18, 2013 at 6:48 AM
I have enable the download missing package option in visual studio on build server.
You need to enable package restore on build server itself. See the documentation:
To enable package restore for build servers without Visual Studio installed, you can also set the environment variable EnableNuGetPackageRestore to "true".
Jul 18, 2013 at 8:43 AM
Hi abatishchev,

Thanks for the reply,

I have found the issue. It is not the issue with enable download missing package. It is something with my tfs build service account.
I have used different account for TFS build configuration and used NETWORK SERVICE account for running the build which throws this error.

Thanks
Hem