Search code examples
visual-studiovisual-studio-2022

Using Visual Studio 2022, is it possible to change the default path where the terminal opens?


I am using VS 2022. When I click View > Terminal it opens Powershell in the solution's root directory.

enter image description here

Is it possible to change this default path to anther customized location within the solution?


Solution

  • It looks like you are using PowerShell, so try specifying the -StartInPath flag are part of the arguments to the PowerShell executable (after the Enter-VsDevShell cmdlet call). Go to Tools → Options → Environment → Terminal and find your profile you are using and modify it like so:

    powershell arguements

    In this example I set mine to C:\ and PowerShell opened up to that location. This cmdlet isn't very well documented, but I did find one website with some information, including this -StartInPath option.