c00000fd
c00000fd

Reputation: 22283

How to move **ALL** settings in VS and where is Visual Studio 2022 setting to prevent automatic insertion of a comment after a new line?

This is annoying to the 10th power. I just migrated my solution to VS 2022, then exported and imported settings by going to Tools -> Import and Export settings. but it did not transfer everything.

So two part question:

  1. How to move ALL settings from one installation of Visual Studio to another? I mean stuff like layout of debugging windows, open panes, etc. There must be a way to do it?

  2. How to prevent it from inserting a comment after I click enter at the end of another comment? The best way is probably to show with a screenshot. How to prevent it from inserting what I showed in red:

  3. List item

Upvotes: 1

Views: 759

Answers (1)

ChrisMM
ChrisMM

Reputation: 10097

Layout is not store with the other settings, unfortunately.

From MS docs:

These layouts automatically roam between Visual Studio editions, and also between Blend instances on separate machines, and from any Express edition to any other Express organization. However, layouts do not roam across Visual Studio, Blend, and Express.

Using procmon, I found that when creating a new layout, it accessed the following file:

C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\17.0_9b589298\ApplicationPrivateSettings.xml

You might be able to copy this file, but I do not know for sure (path might be slightly different)


For the sake of completeness, as you've already found, the comment option is stored in Settings -> Text Editor -> C/C++ -> Code Style -> General, and is the option "Insert existing comment style at the start of new lines when writing comments"

Upvotes: 1

Related Questions