From: http://visualstudioextensions.vlasovstudio.com/2014/02/13/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 Privilegepart 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](http://visualstudioaddins.files.wordpress.com/2014/02/uninstalling-kb2898871-windows-update.png?w=900)
Uninstalling KB2898871 Windows Update
.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 anddevenv.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](http://visualstudioaddins.files.wordpress.com/2014/02/adding-allowdcomreflection-to-vsmsvr10-exe-config.png?w=900)
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.