VS2005 ~ VS2010 中宏不能运行的解决办法

其实这是一个老问题了,表现为你在VS中定义的宏快捷键按了没反应......

“微软就喜欢自己给自己下坑,然后顺带坑所有人” 偷笑


VS2005
C:\Program Files (x86)\Common Files\microsoft shared\VSA\8.0\VsaEnv\vsmsvr.exe.config

VS2008
C:\Program Files (x86)\Common Files\microsoft shared\VSA\9.0\VsaEnv\vsmsvr.exe.config

VS2010
C:\Program Files (x86)\Common Files\microsoft shared\VSA\9.0\VsaEnv\vsmsvr10.exe.config

解决办法:
在上述 .config 文件的 <runtime> 下面增加一行:<AllowDComReflection enabled="true"/>  或 <AllowDComReflection enabled="1"/>  即可
<runtime>  
   
<AllowDComReflection enabled="1"/>  
    ...
</runtime> 



另附:
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.

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.
http://www.microsoft.com/en-us/download/details.aspx?id=42541

Update (October 25): Microsoft released an update for Microsoft Visual Studio 2008 Service Pack 1 that fixes the issue of Visual Studio Macros stop working after installing MS14-009: 
Download KB2938806. 
http://www.microsoft.com/en-US/download/details.aspx?id=42540

And similar update for Microsoft Visual Studio 2005 Service Pack 1: 
Download KB2938803.
http://www.microsoft.com/en-us/download/details.aspx?id=42945



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值