visual studio 宏不能运行的解决方法

VisualStudio里有宏功能(VisualStudio使用技巧),一般我只是用来自动打打注释(本人较懒),但是有时候windows自动更新之后,宏会变得不能运行,下面这种方法可以解决,网上找的比较辛苦,记录一下:


在:C:\Program Files\Common Files\microsoft shared\VSA\9.0\VsaEnv


其中64位机器可能在Program Files(X86)下,有些32版本也可能不在9.0,在8.0下,具体看情况。

给vsmsvr.exe.config文件runtime节点下新增一个节点:
<AllowDComReflection enabled="1"/>


即:
<runtime>
<AllowDComReflection enabled="1"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EnvDTE" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="7.0.3300.0" newVersion="8.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>





发布了49 篇原创文章 · 获赞 71 · 访问量 23万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章