Slava
Slava

Reputation: 6640

How to reset visual studio settings to my saved settings with just a single shortcut?

I was wondering how is it possible to assign keyboard shortcut that will reset my opened VS window to my saved settings (full setting import)?

I am not talking about Tools > Import and Export Setting (I want to have a single Reset shortcut) also I am not talking just about ResetWindowLayout option (this one only resets windows layout, not all settings).

Manually all settings can be restored from saved file by going to

  1. Tools > Import and Export Setting
  2. Import Selected Environment Settings > select "Just Import new settings, overwriting my current settings" radio button
  3. Choose a collection of Setting to Import > select a saved file
  4. Choose Setting to import > Check "All Setting" checkbox
  5. Click Finish

Too many steps, I just want to import my setting with one click, similar to ResetWindowLayout to which I can assign a keyboard shortcut.

Any ideas ?

Upvotes: 1

Views: 324

Answers (1)

Valamas
Valamas

Reputation: 24719

New Answer

Install the macro extension from Microsoft. https://visualstudiogallery.msdn.microsoft.com/d3fbf133-e51b-41a2-b86f-9560a96ff62b/view/Reviews

Create two macro files. Adjust your paths. (I think you need to keep the commented reference path.
SaveSettings:

dte.ExecuteCommand("Tools.ImportandExportSettings", "-export:C:\\Docs\\VS2013\\Settings\\BACKUP.vssettings");

LoadSettings:

dte.ExecuteCommand('Tools.ImportandExportSettings', '-import:C:\\Docs\\VS2013\\Settings\\BACKUP.vssettings');

Old Answer - Still can work for you. I unsure the project is not supported anymore.

Your are in luck. We both had this same question today and I was considering making something myself before stumbling on this.

VS Settings Switcher

This supports saving and loading settings as profile names.

Even better, you can set a solution to default to a particular settings profile. Useful if your project is a web project to appear as a certain layout. Or a class library project with unit testing layouts. Or even for switching between multi and single monitor.

One of the tests I performed with this tool was to not only close and move around my tool windows, but I deleted icons from my toolbars. I then restored all my changes by applying the saved profile.

Upvotes: 2

Related Questions