Visual Studio 2022 keeps re-creating folder in My Documents, although I changed Locations of Project folders

Slobodan Krejaković 21 Reputation points
2022-11-10T18:03:26.457+00:00

I changed the Tools > Options > Projects and Solutions > Locations folder to my custom D drive locations and then I deleted the folder "Visual Studio 2022" from My Documents. However, Visual Studio keeps re-creating an empty folder "Visual Studio 2022" in the My Documents location whenever I start VS.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,130 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
781 questions
0 comments No comments
{count} votes

Accepted answer
  1. AnnaXiu-MSFT 14,901 Reputation points
    2022-11-11T06:23:51.953+00:00

    Hi @SlobodanKrejakovi-0266 ,

    Welcome to Microsoft Q&A!

    It has a default registry key (VisualStudioLocation) and you need to change its default location by using vsregedit.exe.

    Please close all running VS instances and open the Developer Command Prompt for VS 2022 to run the following command:
    vsregedit set local HKCU "" VisualStudioLocation string "D:\xxx"

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful