Skip to content

Instantly share code, notes, and snippets.

@romipetrelis
Last active January 27, 2017 20:22
Show Gist options
  • Save romipetrelis/9ea9c0b3a4e243820b6ec21ca92506f2 to your computer and use it in GitHub Desktop.
Save romipetrelis/9ea9c0b3a4e243820b6ec21ca92506f2 to your computer and use it in GitHub Desktop.
Restore nuget packages during build (for old versions of TFS)
param(
$nugetPath, # Specified in your build definition. Ex: \\someunc\somewhere\nuget.exe
$slnPath # Specified in your build definition. Ex: $(TF_BUILD_SOURCESDIRECTORY)\MySolutionName.sln
)
$exp = $nugetPath + " restore " + $slnPath
Invoke-Expression $exp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment