diff --git a/images/win/scripts/Installers/Install-VS.ps1 b/images/win/scripts/Installers/Install-VS.ps1 index cd55698a..bc282b6c 100644 --- a/images/win/scripts/Installers/Install-VS.ps1 +++ b/images/win/scripts/Installers/Install-VS.ps1 @@ -34,7 +34,8 @@ if ($instanceFolders -is [array]) $vsInstallRoot = (Get-VisualStudioInstance).InstallationPath # Initialize Visual Studio Experimental Instance -& "$vsInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit +# The Out-Null cmdlet is required to ensure PowerShell waits until the '/ResetSettings' command fully completes. +& "$vsInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit | Out-Null # Updating content of MachineState.json file to disable autoupdate of VSIX extensions $newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}' @@ -48,4 +49,4 @@ if (Test-IsWin19) { Install-Binary -Url $sdkUrl -Name $sdkFileName -ArgumentList $argumentList } -Invoke-PesterTests -TestFile "VisualStudio" \ No newline at end of file +Invoke-PesterTests -TestFile "VisualStudio"