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

Slobodan Krejaković 41 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.

Developer technologies Visual Studio Setup
Developer technologies Visual Studio Other
0 comments No comments
{count} vote

Accepted answer
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    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.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.