为了编码的方便,在VS2010中添加了几个用于做注释的宏命令(Macros),之前一直工作正常,近期突然发现调用宏命令时,不能产生作用,并且没有弹出任何异常提示。 在网上查找到一篇文章:http://visualstudioextensions.vlasovstudio.com/2014/02/13/visual-s
为了编码的方便,在VS2010中添加了几个用于做注释的宏命令(Macros),之前一直工作正常,近期突然发现调用宏命令时,不能产生作用,并且没有弹出任何异常提示。
在网上查找到一篇文章:http://visualstudioextensions.vlasovstudio.com/2014/02/13/visual-studio-2010-macros-stop-working-after-february-2014-windows-update/
文中指出该问题是由于2014年2月份的一次windows系统更新,导致VS2010中的宏命令工作异常。
解决方法一:卸载导致问题的升级补丁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
解决方法二:编辑VS2010的运行配置文件
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):
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"
笔者使用第2种解决方法解决了该问题。
本文原创发布php中文网,转载请注明出处,感谢您的尊重!