Prevent Enter-VsDevShell from changing current working directory

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I6de981c06326a6d70bc200af74164a1021f8c138
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
This commit is contained in:
Pavel Dubsky
2025-07-22 20:37:21 +02:00
parent 3247258700
commit 814bfb1923

View File

@@ -360,7 +360,7 @@ function EnterVSDevShell {
Write-Host "Enter VisualStudio developer shell (-host_arch=$HostArch -arch=$Arch -VsInstallPath='$VSPath')"
try {
Import-Module "$VSPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $VSPath -DevCmdArguments "-host_arch=$HostArch -arch=$Arch -no_logo"
Enter-VsDevShell -SkipAutomaticLocation -VsInstallPath $VSPath -DevCmdArguments "-host_arch=$HostArch -arch=$Arch -no_logo"
} catch {
Write-Host "Failed to enter VisualStudio DevShell"
return $false