Skip to content

Commit bac6880

Browse files
add test for targeting pack
1 parent d7cce94 commit bac6880

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

build.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ function needsOpenSsl () {
3737
}
3838

3939
function needsDotNet451TargetingPack () {
40-
# how could we check for this?
40+
if($BootstrapBuildEnv -and ($OS -eq "Windows")) {
41+
$hasNet451TargetingPack = Get-CimInstance Win32_Product | Where-Object Name -match '\.NET Framework 4\.5\.1 Multi-Targeting Pack'
42+
if(-not $hasNet451TargetingPack) {
43+
return $true
44+
}
45+
} elseif($OS -eq "Windows") {
46+
Write-Host "[Bootstrap] Did not check if the .NET 4.5.1 Targeting Pack is present. To check, run 'build.ps1 -BootstrapBuildEnv'"
47+
}
4148
return $false
4249
}
4350

0 commit comments

Comments
 (0)