mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[bootstrap-vcpkg] Added better diagnostics in case of MSBuild failure.
This commit is contained in:
parent
a5b54588ec
commit
516c42bdc4
@ -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")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user