我今天在 VS.. 中构建了一个宏,边做边测试,效果很好。我继续构建另一个,但不小心将其粘贴到 EnvironmentVariables 模块中......我将其删除并保存,但现在没有我创建的宏工作。我尝试了内置示例,例如插入日期,它可以工作,但没有任何自定义工作。
谢谢,
本
最佳答案
不是为了抢走任何人的风头,但我无法添加评论,因为我显然被认为是一个声名狼藉的人,所以我只会将此信息添加为单独的答案。
David Coster 之前(正确且非常有帮助的)答案中引用的页面已更新,以反射(reflect)不再需要卸载有问题的更新的事实。可以通过更改一些配置文件来重新启用宏,如下所述:
Update (February 18): To restore Visual Studio 2010 macros functionality without removing Windows updates, you can add the AllowDComReflection configuration setting to vsmsvr10.exe.config, vsaenv10.exe.config and devenv.exe.config files (note, you need to run your editor with admin rights for correct modification of these files):
<configuration> <runtime> <AllowDComReflection enabled="true"/>
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"
Each of these files already has the runtime section, you just need to add the line.
访问 page cited完整的细节。
关于visual-studio-2010 - Visual Studio 2010 宏问题 - 一起退出工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3714233/