Programmatically reset VisualStudio shortcuts

后端 未结 2 903
温柔的废话
温柔的废话 2020-12-18 23:01

There are two related questions about resetting VisualStudio keyboard scheme and importing VisualStudio settings. However, this doesn\'t seem to play nice all together.

2条回答
  •  我在风中等你
    2020-12-18 23:39

    You can call devenv.exe directly and pass the /ResetSettings switch. Here is a link to the command line options for Visual Studio: https://msdn.microsoft.com/en-us/library/xee0c8y7.aspx

    You can execute devenv.exe using the Systems.Diagnostics.Process class to reset the settings:

    Devenv.exe /ResetSettings

    You can, optionally, pass a settings file which contains the settings you want to restore:

    Devenv.exe /ResetSettings "C:\My Files\MySettings.vssettings"

    In Visual Studio, you can export selected settings by going to Tools > Import and Export Settings... and selecting "Export Selected Environment Settings". Then, only choose the Keyboard checkbox under the All Settings > Options > Environment subtree.

提交回复
热议问题