vsts - How do I pass parameters to NuGet in a Visual Studio Online Build definition? -


i have solution multiple projects in checked in tfs (visual studio team services). want 1 of projects (and therefore dependencies) build , deploy azure web site have created. solution , projects follow nuget 2.7+ automatic package restore method according this guide. works expected in local visual studio 2013 environment.

i created basic deployment build in team services using this guide, build fails error regarding nuget:

****************************************************************************** running tasks ****************************************************************************** ****************************************************************************** starting task: build solution $/path/to/my/project.csproj ****************************************************************************** executing powershell script: c:\lr\mms\services\mms\taskagentprovisioner\tools\agents\default\tasks\vsbuild\1.0.16\vsbuild.ps1 c:\lr\mms\services\mms\taskagentprovisioner\tools\agents\default\agent\worker\tools\nuget.exe restore "c:\a\1\s\path\to\my\project.csproj" -noninteractive msbuild auto-detection: using msbuild version '14.0' 'c:\program files (x86)\msbuild\14.0\bin'. cannot determine packages folder restore nuget packages. please specify either -packagesdirectory or -solutiondirectory. unexpected exit code 1 returned tool nuget.exe

my question is: how specify either -packagesdirectory or -solutiondirectory? wasn't able find documentation regarding this.

or, perhaps going in wrong way altogether?

first seem use outdated approach nuget package restore (with .nuget folder in version control). see this blog post writing limitations of approach.

if need pass specific arguments nuget.exe package restoring should use separate "nuget installer" task, has "nuget arguments" parameter can provide further option nuget.exe restore command.

if use "nuget installer" task package restore can disable "restore nuget packages" option in "visual studio build" task.


Comments