mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Initialize Visual Studio Experimental Instance on the correct user (#4223)
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
$vsInstallRoot = (Get-VisualStudioInstance).InstallationPath
|
$vsInstallRoot = (Get-VisualStudioInstance).InstallationPath
|
||||||
$devEnvPath = "$vsInstallRoot\Common7\IDE\devenv.exe"
|
$devEnvPath = "$vsInstallRoot\Common7\IDE\devenv.exe"
|
||||||
|
|
||||||
|
# Initialize Visual Studio Experimental Instance
|
||||||
|
# The Out-Null cmdlet is required to ensure PowerShell waits until the '/ResetSettings' command fully completes.
|
||||||
|
& "$devEnvPath" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit | Out-Null
|
||||||
|
|
||||||
cmd.exe /c "`"$devEnvPath`" /updateconfiguration"
|
cmd.exe /c "`"$devEnvPath`" /updateconfiguration"
|
||||||
@@ -31,12 +31,6 @@ if ($instanceFolders -is [array])
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$vsInstallRoot = (Get-VisualStudioInstance).InstallationPath
|
|
||||||
|
|
||||||
# Initialize Visual Studio Experimental Instance
|
|
||||||
# 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
|
# 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}'
|
$newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}'
|
||||||
Set-Content -Path "$vsInstallRoot\Common7\IDE\Extensions\MachineState.json" -Value $newContent
|
Set-Content -Path "$vsInstallRoot\Common7\IDE\Extensions\MachineState.json" -Value $newContent
|
||||||
|
|||||||
Reference in New Issue
Block a user