diff --git a/build.ps1 b/build.ps1 index 8488d08b8..4db47b3ac 100644 --- a/build.ps1 +++ b/build.ps1 @@ -194,6 +194,19 @@ function VSX Write-Diagnostic "Finished build targeting toolchain $Toolchain" } +function NugetPackageRestore +{ + $nuget = Join-Path $env:LOCALAPPDATA .\nuget\NuGet.exe + if(-not (Test-Path $nuget)) { + Die "Please install nuget. More information available at: http://docs.nuget.org/docs/start-here/installing-nuget" + } + + Write-Diagnostic "Restore Nuget Packages" + + # Restore packages + . $nuget restore $CefSln +} + function Nupkg { $nuget = Join-Path $env:LOCALAPPDATA .\nuget\NuGet.exe @@ -209,6 +222,8 @@ function Nupkg . $nuget pack nuget\CefSharp.WinForms.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget } +NugetPackageRestore + switch -Exact ($Target) { "nupkg" {