Skip to content

Instantly share code, notes, and snippets.

@abbottdev
Last active February 22, 2017 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abbottdev/2bbcc561e94ac65ca4cbf58b9559522c to your computer and use it in GitHub Desktop.
Save abbottdev/2bbcc561e94ac65ca4cbf58b9559522c to your computer and use it in GitHub Desktop.
Restores NuGet packages in a specified folder without the need for a solution file.
$nugetFolder = "%teamcity.tool.NuGet.CommandLine.3.5.0%\tools"
$solutionDirectory = "%system.teamcity.build.workingDir%\"
$nuget = "$nugetFolder\nuget.exe"
Get-ChildItem -Include *.csproj, *.vbproj -Recurse | % {
Write-Host "Processing Project $($_.Name)"
& $nuget restore $_.FullName -solutiondirectory $solutionDirectory
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment