Files
qt5/coin/pre-provisioning/qtci-windows-10_22H2-x86_64/01-enable-dotnet-framework.ps1
Heikki Halmet e9b3497c8e Add Windows 10 22H2 to CI
Pre-installed to tier 1:
          MSVC 2022 17.3.6 plus build tools
	  MSVC 2019 16.11.20 plus build tools
          MSVC 2015 update 3 14.0.25420.1

Task-number: QTQAINFRA-5262
Change-Id: Ibcc2950dd7edef0d6aa92cef7e602a69da8498d9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2022-11-18 08:34:53 +00:00

24 lines
707 B
PowerShell

# The DirectX SDK installer requires .Net framework 3.5 which isn't installed by default
# NOTE! Windows Update service need to be enabled when running this script!
$netFeature = "NetFx3"
try {
$netFeatureState = (Get-WindowsOptionalFeature -Online -FeatureName "$netFeature").State
if ($netFeatureState -eq "Enabled") {
Write-Host ".Net Framework is already installed"
exit 0
}
} catch {
Write-Host "Could not find .Net Framework Windows feature."
exit 1
}
Write-Host "Installing .Net Framework client"
try {
Enable-WindowsOptionalFeature -Online -FeatureName "$netFeature" -All -NoRestart
} catch {
Write-Host "Could not install .Net framework"
exit 1
}