问题
My Visual Studio Macros stopped working, with no errors displayed or logged I could find.
(I did think it was something I did to my machine.)
回答1:
Microsoft released a Windows Update that fixed a security issue (MS14-009) that broke Visual Studio Macros.
The workaround, described in KB2934830, is to add
<?xml version="1.0"?>
<configuration>
<runtime>
<AllowDComReflection enabled="1"/>
</runtime>
</configuration>
to your Visual Studio Macros Server .exe.config
.
Depending upon your Visual Studio version and Windows bitness, the file is:
64-bit Windows:
\Program Files (x86)\Common Files\Microsoft Shared\VSA\
32-bit Windows:
\Program Files\Common Files\Microsoft Shared\VSA\
VS2k5 (SP1):
8.0\VsaEnv\Vsmsvr.exe.config
VS2k8:
9.0\VsaEnv\Vsmsvr.exe.config
VS2010:
9.0\VsaEnv\Vsmsvr10.exe.config
You'll need to edit the file as an administrator (or otherwise adjust permissions), and it ought to already contain the <configuration><runtime>
section.
(Although I gleaned the above from the KB article, my Google searching found this via this.)
来源:https://stackoverflow.com/questions/22063368/visual-studio-macros-stopped-working