From 1e7e6749a5fa9ad8d332d8d93ae24785579e5fc9 Mon Sep 17 00:00:00 2001 From: josetr <37419832+josetr@users.noreply.github.com> Date: Tue, 28 Sep 2021 09:30:00 +0100 Subject: [PATCH] Fix Visual Studio Experimental Instance Initialization (#4143) --- images/win/scripts/Installers/Install-VS.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-VS.ps1 b/images/win/scripts/Installers/Install-VS.ps1 index cd55698a6..bc282b6ce 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"