Skip to content

Commit ecc302b

Browse files
authored
Merge pull request #69743 from tristanlabelle/tristan/build.ps1-vcredist-msms
Update build.ps1 for installer changes for VCRuntime dlls
2 parents ef83cff + 258c420 commit ecc302b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

utils/build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,10 +1688,10 @@ function Build-Installer($Arch) {
16881688

16891689
Isolate-EnvVars {
16901690
Invoke-VsDevShell $Arch
1691-
$VCRedistInstallerPath = "${env:VCToolsRedistDir}\vc_redist.$($Arch.ShortName).exe"
1692-
if (Test-Path $VCRedistInstallerPath) {
1693-
$Properties["VCRedistInstaller"] = $VCRedistInstallerPath
1694-
$Properties["VSVersion"] = $env:VSCMD_VER
1691+
# Avoid hard-coding the VC tools version number
1692+
$VCRedistDir = (Get-ChildItem "${env:VCToolsRedistDir}\$($HostArch.ShortName)" -Filter "Microsoft.VC*.CRT").FullName
1693+
if ($VCRedistDir) {
1694+
$Properties["VCRedistDir"] = "$VCRedistDir\"
16951695
}
16961696
}
16971697

0 commit comments

Comments
 (0)