diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 431d1af29..f7f414f3f 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -771,6 +771,12 @@ "{{ template_dir }}/scripts/Installers/Disable-JITDebugger.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Run-NGen.ps1" + ] + }, { "type": "powershell", "inline": [ diff --git a/images/win/scripts/Installers/Run-NGen.ps1 b/images/win/scripts/Installers/Run-NGen.ps1 new file mode 100644 index 000000000..c00aa1a4a --- /dev/null +++ b/images/win/scripts/Installers/Run-NGen.ps1 @@ -0,0 +1,6 @@ +Write-Host "NGen: Microsoft.PowerShell.Utility.Activities" +$null = & $env:SystemRoot\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install "Microsoft.PowerShell.Utility.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" +Write-Host "NGen: Framework64" +$null = & $env:SystemRoot\Microsoft.NET\Framework64\v4.0.30319\ngen.exe update +Write-Host "NGen: Framework" +$null = & $env:SystemRoot\Microsoft.NET\Framework\v4.0.30319\ngen.exe update \ No newline at end of file