diff --git a/images/win/scripts/Installers/Install-NET48-devpack.ps1 b/images/win/scripts/Installers/Install-NET48-devpack.ps1 new file mode 100644 index 00000000..33d4f355 --- /dev/null +++ b/images/win/scripts/Installers/Install-NET48-devpack.ps1 @@ -0,0 +1,13 @@ +################################################################################ +## File: Install-NET48-devpack.ps1 +## Desc: Install .NET 4.8 devpack +################################################################################ + +# .NET 4.8 Dev pack +$InstallerName = "ndp48-devpack-enu.exe" +$InstallerUrl = "https://download.visualstudio.microsoft.com/download/pr/014120d7-d689-4305-befd-3cb711108212/0307177e14752e359fde5423ab583e43/${InstallerName}" +$ArgumentList = ("Setup", "/passive", "/norestart") + +Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList + +Invoke-PesterTests -TestFile "Tools" -TestName "NET48" \ No newline at end of file diff --git a/images/win/scripts/Installers/Install-NET48.ps1 b/images/win/scripts/Installers/Install-NET48.ps1 index ef26a3c0..4e4c507c 100644 --- a/images/win/scripts/Installers/Install-NET48.ps1 +++ b/images/win/scripts/Installers/Install-NET48.ps1 @@ -4,10 +4,8 @@ ################################################################################ # .NET 4.8 Dev pack -$InstallerName = "ndp48-devpack-enu.exe" -$InstallerUrl = "https://download.visualstudio.microsoft.com/download/pr/014120d7-d689-4305-befd-3cb711108212/0307177e14752e359fde5423ab583e43/${InstallerName}" +$InstallerName = "ndp48-x86-x64-allos-enu.exe" +$InstallerUrl = "https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/${InstallerName}" $ArgumentList = ("Setup", "/passive", "/norestart") Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList - -Invoke-PesterTests -TestFile "Tools" -TestName "NET48" \ No newline at end of file diff --git a/images/win/windows2019.json b/images/win/windows2019.json index 03e1a364..03f13124 100644 --- a/images/win/windows2019.json +++ b/images/win/windows2019.json @@ -125,6 +125,22 @@ "elevated_user": "{{user `install_user`}}", "elevated_password": "{{user `install_password`}}" }, + { + "type": "powershell", + "valid_exit_codes": [ + 0, + 3010 + ], + "scripts": [ + "{{ template_dir }}/scripts/Installers/Install-NET48.ps1" + ], + "elevated_user": "{{user `install_user`}}", + "elevated_password": "{{user `install_password`}}" + }, + { + "type": "windows-restart", + "restart_timeout": "10m" + }, { "type": "powershell", "environment_vars": [ @@ -170,7 +186,7 @@ "scripts": [ "{{ template_dir }}/scripts/Installers/Install-VS.ps1", "{{ template_dir }}/scripts/Installers/Install-KubernetesTools.ps1", - "{{ template_dir }}/scripts/Installers/Install-NET48.ps1" + "{{ template_dir }}/scripts/Installers/Install-NET48-devpack.ps1" ], "elevated_user": "{{user `install_user`}}", "elevated_password": "{{user `install_password`}}" @@ -345,4 +361,4 @@ ] } ] -} +} \ No newline at end of file