aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-31 23:41:24 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-31 23:41:24 -0700
commit516c42bdc4a5443e0f78fae559c187823e6326d1 (patch)
treea6dab360d6cf3c4db1b49288f1d0e03bb84ac12d /scripts
parenta5b54588eca1d57366f7052ee9ab30da4ba68066 (diff)
downloadvcpkg-516c42bdc4a5443e0f78fae559c187823e6326d1.tar.gz
vcpkg-516c42bdc4a5443e0f78fae559c187823e6326d1.zip
[bootstrap-vcpkg] Added better diagnostics in case of MSBuild failure.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.ps18
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index f44a7dea1..b14dbbe4a 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -32,7 +32,8 @@ $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc"
if (!(Test-Path $vcpkgSourcesPath))
{
- New-Item -ItemType directory -Path $vcpkgSourcesPath -force | Out-Null
+ Write-Error "Unable to determine vcpkg sources directory. '$vcpkgSourcesPath' does not exist."
+ return
}
try
@@ -43,6 +44,11 @@ try
$platformToolset = $msbuildExeWithPlatformToolset[1]
$windowsSDK = & $scriptsDir\getWindowsSDK.ps1
& $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj
+ if ($LASTEXITCODE -ne 0)
+ {
+ Write-Error "Building vcpkg.exe failed. Please ensure you have installed the Desktop C++ workload and the Windows SDK for Desktop C++."
+ return
+ }
Write-Verbose("Placing vcpkg.exe in the correct location")