Visual Studio 2010 Macros Stop Working

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

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.configvsaenv10.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

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.


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值