Visual Studio Keyboard Shortcuts disappear
I have a custom VS extension which adds commands to the Tools menu. It's running in VS 2022 with C++ solutions. I use the Tools->Options menu to add shortcuts to some of these custom commands. I save and exit VS and then start it up again witheth same solution. All is as expected - the shortcuts are still present. I exit VS and open a second solution. Again, all is good. Finally, I open a second instance of VS in parallel with either of the two presvious solutions. Now the shortcuts have disappeared from BOTH instances of VS. I can see that the ApplicationPrivateSettings.xml is being updated. When the error happens, the ".A" entry for the command is removed but the ".R" entry is present.
Can anyone explain this behaviour? I suspect that the custom extension is wiping the shortcut but I can't explain why it only happens when there is a second VS instance open.
Finally, in C# (the extension is written in C#), how can I read the existing shortcuts that are configured?