Monday, September 30, 2013

Tip 6.5: What's the difference between resetting settings and importing settings?

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog

Whenever she demos Tools–Import And Export Settings, she's usually asked to explain the difference between the Import feature and the Reset feature. From an end-user perspective, importing everything in that particular settings file provides the same functionally as a reset.


But of course, there's more going on under the UI surface. Whenever you do a reset, the IDE stores the path of the file you picked to reset to in the registry. There are some shortcuts within the IDE to quickly reset those settings. Following are a couple of the most common of these quick reset options. First, on the Tools–Options–Environment–Fonts And Colors page, you'll see the Use Defaults option. This option resets your fonts and colors using the settings file you last reset to.


Second, on the Window menu, there's the command Reset Window Layout. This command resets your window layouts (that is, all your tool windows in all four window layout states) using the settings file you last reset to.


But ... What if you attempt to reset using a file you last reset to that didn't contain this particular category? For example, let's say you last reset to your own settings file and it didn't contain the Window Layouts category. Then she believes Visual Studio uses its factory defaults (the legacy settings that were built in for Visual Studio .NET 2003, the version before the Import And Export Settings feature was built) whenever you do Windows–Reset Window Layout. She recalls during one of the many Profiles feature design meetings the term schizophrenia being used to describe the possible states Visual Studio could end up in. =D

Happy Programming! =)
Posted by Nils-Holger at 12:58 PM with 688 comments.

Sunday, September 29, 2013

Tip 6.4: You can add your own files to the Import And Export Settings–Reset page list

"Visual Studio Tips, 251 Ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog

If you go to the Reset page on the Tools–Import And Export Settings Wizard, you'll see the list of files you can reset to. These settings files are the ones created by the Visual Studio team. But, let's say that one of the default files has some small option that just annoys you or you want to add your own file to the list, as shown here:


These files live at \Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Profiles. You'll need administrator rights to access Program Files, so please use this tip at your own risk.

In this folder, you can add your own .vssettings files or modify the existing ones. She uses the General Development Settings, but any time she does a reset, the Tools–Customize–Show Shortcut Keys In ScreenTips option becomes unchecked. This option shows you the keyboard shortcut for a toolbar button in the ToolTip, a visual cue she absolutely must have.

If you find yourself in a similar situation, where you want to make small tweaks to one of the default settings files provided, you can do the following:
    1. Reset to General Development Settings.
    2. Enable the setting or settings you prefer.
    3. Do a full export (for example, check all options in the Export page), and write over the General Development Settings.
    4. Copy this file over the existing General Development Settings file that lives in \Program Files.

The next time you reset using these settings, you'll see your preferred settings. And in her case, she'll see her keyboard shortcuts in her ToolTips!

Happy Programming! =)
Posted by Nils-Holger at 12:51 PM with 907 comments.

Saturday, September 28, 2013

Tip 6.3: What settings are contained in the New Project Dialog Preferred Language category

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog

If you go to Tools–Import And Export Settings–Export Settings, you'll see the list of categories that can be contained in a .vssettings file. The first category she wants to discuss is the New Project Dialog Preferred Language category.

As noted in the description, it organizes the New Project Dialog folders based on the preferred language. If C# is preferred, all the C# projects are listed at the top of the list and all the others are collected toward the bottom. The General Development Settings use the defaults that have been familiar since the Visual Studio .NET 2002 days, as shown here:


Now let's see the dialog box using the Visual C# Development Settings. Note how Visual Basic and Visual C++ fall into the newly created Other Languages node.


Happy Programming! =)
Posted by Nils-Holger at 12:22 PM with 727 comments.