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

查看:20
本文介绍了宏不在 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-02-11,Microsoft 发布了公告 MS14-009 - 重要.漏洞 CVE2014-0257 是修复列表之一.这与通过使用反射来执行调用者通常无法访问的代码来提升权限有关.部分解决方案涉及禁用 COM 接口上的反射.这导致了适用于所有 .NET Framework 和 Windows 组合的一系列补丁.您可以通过上面的链接查看列表.

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 FilesMicrosoft SharedVSA8.0VsaEnvVsmsvr.exe.config

VS2008:

C:Program Files (x86)Common FilesMicrosoft SharedVSA9.0VsaEnvVsmsvr.exe.config

VS2010:

C:Program Files (x86)Common FilesMicrosoft SharedVSA9.0VsaEnvVsmsvr10.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天全站免登陆