Macros don't run in Visual Studio 2010

前端 未结 1 1331
北海茫月
北海茫月 2020-12-03 14:38

Macros in Visual Studio 2010 cannot be started any more. They don\'t hit a breakpoint in their first line in the macro IDE. There is no error message. Macros can s

相关标签:
1条回答
  • 2020-12-03 15:23

    On 2014-02-11, Microsoft released bulletin MS14-009 - Important. Vulnerability CVE2014-0257 is among the list of fixes. This relates to an elevation of privileges through use of reflection to execute code normally inaccessible to the caller. Part of the solution involves disabling reflection over COM interfaces. This resulted in a family of patches for all .NET Framework and Windows combinations. You can view the list through the link above.

    Microsoft released a follow-up KB2934830 to address problems with running macros through Visual Studio. You will need to edit one or more of the following files as an administrator:

    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
    

    Add this under the runtime section. runtime should already exist:

    <AllowDComReflection enabled="true"/> 
    

    This should make macros execute as expected.

    0 讨论(0)
提交回复
热议问题