TFS 2010 - Building out Nuget using TFS results in TFS error: Package
restore is disabled by default. To give consent, open the
I downloaded a standard copy of the Nuget web app and plan to use it in
our corporate environment. We use TFS 2010 to facilitate the builds from
our local machine. When I queue a new build on TFS for Nuget, the build
fails with the error:
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'.
QUESTION: do I need to do what it says above on the TFS build server, or
on my local machine in Visual Studio? How can I resolve this issue? If
this is in fact an issue on the TFS build server, and the build server
doesn't allow to download missing packages, do I need to just download
those packages and check them into Source Control?
Here's the log file that resulted from the build, which also contains the
errors:
Build started 9/19/2013 12:19:08 PM. 1>Project
"F:\Builds\2\Nuget\NuGetGallery\Sources\NuGetGallery.sln" on node 1
(default targets). 1>ValidateSolutionConfiguration: Building solution
configuration "Release|Any CPU". 1>Project
"F:\Builds\2\Nuget\NuGetGallery\Sources\NuGetGallery.sln" (1) is building
"F:\Builds\2\Nuget\NuGetGallery\Sources\Website\Website.csproj" (2) on
node 1 (default targets). 2>RestorePackages:
"F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\nuget.exe" install
"F:\Builds\2\Nuget\NuGetGallery\Sources\Website\packages.config" -o
"F:\Builds\2\Nuget\NuGetGallery\Sources\packages" 1>Project
"F:\Builds\2\Nuget\NuGetGallery\Sources\NuGetGallery.sln" (1) is building
"F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\Facts.csproj" (3) on node 2
(default targets). 3>RestorePackages:
"F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\nuget.exe" install
"F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\packages.config" -o
"F:\Builds\2\Nuget\NuGetGallery\Sources\packages"
2>F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\NuGet.targets(6,9): error :
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'. [F:\Builds\2\Nuget\NuGetGallery\Sources\Website\Website.csproj]
2>F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\NuGet.targets(6,9): error
MSB3073: The command
""F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\nuget.exe" install
"F:\Builds\2\Nuget\NuGetGallery\Sources\Website\packages.config" -o
"F:\Builds\2\Nuget\NuGetGallery\Sources\packages"" exited with code 1.
[F:\Builds\2\Nuget\NuGetGallery\Sources\Website\Website.csproj] 2>Done
Building Project
"F:\Builds\2\Nuget\NuGetGallery\Sources\Website\Website.csproj" (default
targets) -- FAILED.
3>F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\NuGet.targets(6,9): error :
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'. [F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\Facts.csproj]
3>F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\NuGet.targets(6,9): error
MSB3073: The command
""F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\nuget.exe" install
"F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\packages.config" -o
"F:\Builds\2\Nuget\NuGetGallery\Sources\packages"" exited with code 1.
[F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\Facts.csproj] 3>Done
Building Project
"F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\Facts.csproj" (default
targets) -- FAILED. 1>Done Building Project
"F:\Builds\2\Nuget\NuGetGallery\Sources\NuGetGallery.sln" (default
targets) -- FAILED.
Build FAILED.
"F:\Builds\2\Nuget\NuGetGallery\Sources\NuGetGallery.sln" (default
target) (1) ->
"F:\Builds\2\Nuget\NuGetGallery\Sources\Website\Website.csproj"
(default target) (2) ->
(RestorePackages target) ->
F:\Builds\2\Nuget\NuGetGallery\Sources\.nuget\NuGet.targets(6,9):
error : 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'. [F:\Builds\2\Nuget\NuGetGallery\Sources\Website\Website.csproj]
F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\NuGet.targets(6,9): error
MSB3073: The command
""F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\nuget.exe" install
"F:\Builds\2\Nuget\NuGetGallery\Sources\Website\packages.config" -o
"F:\Builds\2\Nuget\NuGetGallery\Sources\packages"" exited with code 1.
[F:\Builds\2\Nuget\NuGetGallery\Sources\Website\Website.csproj]
"F:\Builds\2\Nuget\NuGetGallery\Sources\NuGetGallery.sln" (default
target) (1) ->
"F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\Facts.csproj" (default
target) (3) ->
F:\Builds\2\Nuget\NuGetGallery\Sources\.nuget\NuGet.targets(6,9):
error : 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'. [F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\Facts.csproj]
F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\NuGet.targets(6,9): error
MSB3073: The command
""F:\Builds\2\Nuget\NuGetGallery\Sources.nuget\nuget.exe" install
"F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\packages.config" -o
"F:\Builds\2\Nuget\NuGetGallery\Sources\packages"" exited with code 1.
[F:\Builds\2\Nuget\NuGetGallery\Sources\Facts\Facts.csproj]
0 Warning(s)
4 Error(s)
Time Elapsed 00:00:00.82
No comments:
Post a Comment