Adjusting the width of “Solution Configurations” drop-down list in the Visual Studio toolbar

You rarely change the width of Visual Studio toolbar elements, but it is good to know about such possibility. For example, to change the width of Solution Configurations drop-down list, go to toolbar customization and adjust the Width value:

Toolbar element width customization in Visual Studio 2013

Toolbar element width customization in Visual Studio 2013


References:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/7b6a504c-7df0-40b3-900f-4ff49a7b0f95/how-to-change-the-width-of-solution-configurations-dropdown-list-in-the-ide-toolbar?forum=vsx

http://mikesknowledgebase.azurewebsites.net/pages/Other/VS2012ConfigurationToolbar.htm

Posted in Visual Studio tips | Leave a comment

See more lines of code with syntactic line compression

The recent May 2014 update of Productivity Power Tools for Visual Studio 2013 adds the syntactic line compression feature. “It shrinks lines that contain neither letters nor numbers by 25% vertically, allowing more lines to be displayed in the editor.” In the following sample compressed code takes about 10% less vertical screen space:

Syntactic line compression before and after

Syntactic line compression before and after


In practice most frequently compressed lines are blank ones and lines with braces. If you place opening braces on the same line with code, compressed closing braces will look somewhat odd:
Compressed closing braces

Compressed closing braces


In this case you may want to compress only blank lines. This setting is available in syntactic line compression options:
Syntactic line compression options

Syntactic line compression options


I think it’s a nice enhancement that just works.

Posted in Visual Studio news | Tagged , | 1 Comment

Tabs Studio v3.2.0 adds support for SQL Server Management Studio 2014

Tabs Studio is a Visual Studio and SSMS add-in empowering you to work comfortably with any number of open documents.

v3.2.0 adds support for SSMS 2014 and the ability to show an SQL query description in the SSMS tab name. See the full what’s new list.

Download the installer.

Posted in Vlasov Studio tools | Tagged , , , , | Leave a comment

Visual Commander v1.6 adds common code modules for commands and extensions

Visual Commander is a freemium extension for Visual Studio 2010+ allowing you to automate repetitive tasks in the IDE.

Visual Commander Professional v1.6 adds the ability to create common code modules that can be reused from different commands and extensions:

A common code module in Visual Studio 2013

A common code module in Visual Studio 2013

Visual Commander v1.6 also adds the ability to run commands directly from the Commands window by double-clicking or with the new Run button.

Download the installer.

Posted in Vlasov Studio tools | Tagged , , , | Leave a comment

Visual Studio 2010 Macros Stop Working after February 2014 Windows Update

Installing recent February 11, 2014 Windows updates breaks Visual Studio 2010 macros functionality. Macros just don’t run any more without an error message. More specifically, it is MS14-009 update “Vulnerabilities in .NET Framework Could Allow Elevation of Privilege (2916607)” (rated as Important) breaks macros. And more specifically it is the Elevation of Privilege part of this update.

MS14-009 includes several updates for different OS and .NET versions. To restore Visual Studio 2010 macros functionality you need to uninstall the Elevation of Privilege patch specific for your machine. For example, on a Windows 8.1 machine you need to uninstall KB 2898871:

Uninstalling KB2898871 Windows Update

Uninstalling KB2898871 Windows Update

Windows update to uninstall to restore macros functionality in Visual Studio 2010
.NET 4.5.1 .NET 4.5 .NET 4
Windows 8.1 KB2898871
Windows 8 KB2898870 KB2898865
Windows 7 KB2898869 KB2898864 KB2898855
Windows XP KB2898855

The Visual Commander extension (a modern alternative to Visual Studio macros) is not affected by this Windows update.

Update (February 18): To restore Visual Studio 2010 macros functionality without removing Windows updates, you can add the AllowDComReflection configuration setting (published by Jens) to vsmsvr10.exe.config, vsaenv10.exe.config and devenv.exe.config files (note, you need to run your editor with admin rights for correct modification of these files):

<configuration>
    <runtime>
        <AllowDComReflection enabled="true"/>

On a 64-bit Windows machine default paths to these files are:

"C:\Program Files (x86)\Common Files\Microsoft Shared\VSA\9.0\VsaEnv\vsmsvr10.exe.config"
"C:\Program Files (x86)\Common Files\Microsoft Shared\VSA\9.0\VsaEnv\vsaenv10.exe.config"
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config"

Each of these files already has the runtime section, you just need to add the <AllowDComReflection enabled="true"/> line:

Adding AllowDComReflection to vsmsvr10.exe.config

Adding AllowDComReflection to vsmsvr10.exe.config

To restore Visual Studio 2008 macros functionality, you need to add AllowDComReflection to the following files:

"C:\Program Files (x86)\Common Files\Microsoft Shared\VSA\9.0\VsaEnv\vsmsvr.exe.config"
"C:\Program Files (x86)\Common Files\Microsoft Shared\VSA\9.0\VsaEnv\vsaenv.exe.config"
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe.config"

Update (February 25): Microsoft published KB2934830 “Marshaling of reflection types may not work over DCOM after you install a security update from security bulletin MS14-009″. It acknowledges that macro functionality in Microsoft Visual Studio may not work as expected after installing MS14-009. As a workaround to restore the functionality of Visual Studio macros, the article suggests updating one of the following application configuration files, depending on the version of Visual Studio that is installed on the system:

Visual Studio 2010 c:\Program Files (x86)\Common Files\Microsoft Shared\VSA\9.0\VsaEnv\Vsmsvr10.exe.config
Visual Studio 2008 c:\Program Files (x86)\Common Files\Microsoft Shared\VSA\9.0\VsaEnv\Vsmsvr.exe.config
Visual Studio 2005 SP1 c:\Program Files (x86)\Common Files\Microsoft Shared\VSA\8.0\VsaEnv\Vsmsvr.exe.config

You need to add the AllowDComReflection configuration switch in the <runtime> section of an .exe.config file as follows:

 <?xml version ="1.0"?>
 <configuration>
     <runtime>
         <AllowDComReflection enabled="1"/>
     </runtime>
 </configuration>

Update (May 20): Microsoft released an update for Microsoft Visual Studio 2010 Service Pack 1 that fixes the issue of Visual Studio Macros stop working after installing MS14-009. Download KB2938807.

Posted in Visual Studio news | Tagged , | 66 Comments

Continuous code formatting for Visual Studio

The new Continuous Formatting extension automates C# and C++ code formatting in Visual Studio 2013/2012/2010. It removes the necessity to format code (and reformat, and reformat again) manually, arranging code continuously as you type and make changes. More importantly, it allows you not to think about code layout and concentrate on more important software development activities.

At the moment Continuous Formatting uses the built-in Visual Studio code formatting engine that is controlled by standard text editor formatting options. I plan to add support for external code beautifiers as well.

Download the installer.

Posted in Vlasov Studio tools | Tagged , , , | 1 Comment

Visual Studio Class View and Object Browser Icons

A good reference for Visual Studio icons related to code, available for different versions of Visual Studio.

Posted in Visual Studio tips | Leave a comment