>  기사  >  데이터 베이스  >  VS2010中宏功能在2014年2月份的一个系统更新之后不能正常使用

VS2010中宏功能在2014年2月份的一个系统更新之后不能正常使用

WBOY
WBOY원래의
2016-06-07 15:43:111523검색

为了编码的方便,在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.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"></allowdcomreflection>
</runtime></configuration>

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种解决方法解决了该问题。
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.