
Question:
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
<ol><li>Tools > Import and Export Setting </li> <li>Import Selected Environment Settings > select "Just Import new settings, overwriting my current settings" radio button </li> <li>Choose a collection of Setting to Import > select a saved file </li> <li>Choose Setting to import > Check "All Setting" checkbox </li> <li>Click Finish</li> </ol>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 ?
Answer1:<h2>New Answer</h2>
Install the macro extension from Microsoft. <a href="https://visualstudiogallery.msdn.microsoft.com/d3fbf133-e51b-41a2-b86f-9560a96ff62b/view/Reviews" rel="nofollow">https://visualstudiogallery.msdn.microsoft.com/d3fbf133-e51b-41a2-b86f-9560a96ff62b/view/Reviews</a>
Create two macro files. Adjust your paths. (I think you need to keep the commented reference path.<br /><strong>SaveSettings:</strong>
dte.ExecuteCommand("Tools.ImportandExportSettings", "-export:C:\\Docs\\VS2013\\Settings\\BACKUP.vssettings");
<strong>LoadSettings:</strong>
dte.ExecuteCommand('Tools.ImportandExportSettings', '-import:C:\\Docs\\VS2013\\Settings\\BACKUP.vssettings');
<h2>Old Answer - Still can work for you. I unsure the project is not supported anymore.</h2>
Your are in luck. We both had this same question today and I was considering making something myself before stumbling on this.
<a href="https://visualstudiogallery.msdn.microsoft.com/fa71b090-7a6d-49a3-98aa-54d5e3feaa6b" rel="nofollow">VS Settings Switcher</a>
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.