宏不在Visual Studio 2010中运行 [英] Macros don't run in Visual Studio 2010

查看:86
本文介绍了宏不在Visual Studio 2010中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2010 中的宏无法再启动.他们在宏IDE的第一行中没有遇到断点.没有错误信息.宏仍然可以记录,代码显示在宏IDE中,但是新记录的宏也无法启动.宏文件中没有错误,至少在错误列表中没有显示错误.如果我有意添加错误,则该错误将显示在错误列表中.

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 still be recorded, the code is shown in the macro IDE, but newly recorded macros cannot be started either. There is no error in the macro files, at least there is no error displayed in the error list. If I add an error intentionally, the error is getting displayed in the error list.

启动宏时,光标会发生短暂变化,但没有其他反应,并且输出视图中没有输出.似乎有一个设置或选项阻止了宏的运行,但是我找不到任何这样的设置.我在第二台计算机上(在同一网络上)遇到了相同的问题,因此可能是某些Windows(7)更新引起了该问题.过去,我确实经常使用宏,没有任何问题,最近也没有更改宏代码.

There is a short cursor change when I start the macro, but nothing else happens, and there is no output in the output view. It looks like there is a setting or option which prevents macros from running, but I cannot find any such setting. I experience the same problem on a second computer (on the same network), so maybe some Windows (7) update caused the problem. I did use macros frequently in the past without any problems and did not change the macros code recently.

有人遇到同样的问题吗?

Is anyone experiencing the same problem?

推荐答案

2014年2月11日,Microsoft发布了公告

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发布了后续产品 KB2934830 ,以解决通过Visual Studio运行宏的问题.您将需要以管理员身份编辑以下一个或多个文件:

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.

这篇关于宏不在Visual Studio 2010中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆