如何解决VSTO插件不加载? [英] How to troubleshoot a VSTO addin that does not load?

查看:368
本文介绍了如何解决VSTO插件不加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的VSTO Outlook插件突然停止工作的一个客户机(它不会加载,没有错误消息),我只能和故障排除。本机Windows 7的86,Outlook 2007中的加载项写入与Visual Studio 2008,并使用VSTO 2005年与2003 PIA的(因为我们需要支持的Outlook 2003以及)。它的工作原理完全正常在其他计算机上。

My VSTO Outlook Add-in suddenly stopped working on one customer machine (it does not load, no error message) and I'm stuck with troubleshooting. The machine is Windows 7 x86, Outlook 2007. The add-in is written with Visual Studio 2008 and uses VSTO 2005 with the 2003 PIAs (because we need to support Outlook 2003 as well). It works perfectly fine on other machines.

下面是我试图让有用的故障诊断输出:

Here's what I tried to get useful troubleshooting output:

  • Add the VSTO_SUPPRESSDISPLAYALERTS environment variable (set to 0).
  • Start Outlook with administrative permissions.
  • Look into the event log.

什么也没有。该加载项是不会加载不放弃的任意的指示的原因。我也查了秋后算账(CAS策略,PIA的安装,LoadBehavior的注册表,重新安装VSTO和加载项)。

Nothing. The add-in just won't load without giving any indication of the reason. I've also checked the "usual suspects" (CAS policy, PIAs installed, LoadBehavior in the registry, reinstalling VSTO and the add-in).

其他的一些意见:

  • LoadBehavior的在注册表保持在 3
  • 加载项显示为在Outlook中的已禁用。检查它的COM加载项只是什么也不做(没有错误,复选框,然后再次进入表单时第二次被清除)。
  • 复选框
  • 在这工作完全正常的另外一个用户的机器,它的工作完全没有这台机器上。 (不,客户不能告诉我什么改变了他的机器上。)
  • 在我有一个 Trace.WriteLine 的消息在我的code。在 ThisAddIn_Startup 处理程序),这是没有达到(我用的DebugView 选中)。因此,不加载的原因是不是在我的加载项异常,而是VSTO的失败加载的Outlook加载项或加载VSTO。
  • LoadBehavior in the registry stays at 3.
  • The add-in shows up as "disabled" in Outlook. Checking its checkbox in "COM add-ins" just does nothing (no error, checkbox is cleared again when entering the form a second time).
  • It works perfectly fine on other customer machines, and it worked perfectly fine on this machine. (No, the customer cannot tell me what changed on his machine.)
  • I have a Trace.WriteLine message at the very top of my code (first line in the ThisAddIn_Startup handler), which is not reached (I checked with DebugView). Thus, the reason for not loading is not an exception in my add-in but rather a failure of VSTO to load the add-in or of Outlook to load VSTO.

相反更随意调试(试试这个......,尝试...),我真的很喜欢的力Outlook和/或VSTO告诉我什么是错 ,也就是给我一个有用的错误消息,而不是仅仅的无所事事的尝试启用该加载项时。有任何想法吗?

Instead of more random debugging ("try this...", "try that..."), I'd really like to force Outlook and/or VSTO to tell me what's wrong, i.e. to give me a useful error message instead of just doing nothing when trying to enable the add-in. Any ideas?

推荐答案

您是否尝试再次启用该加载项?在禁用的队列及其后它将无法运行。当您从禁用的加载项在屏幕上重新启用它,你可以检查在COM-的AddIn屏框有它加载自设置,然后应提示您更详细的 VSTO_SUP $ P什么可能发生在首位$ pSSDISPLAYALERTS 变量。

Did you try enabling the add-in again? It won't run after its in the disabled queue. After you re-enable it from the disabled add-in screen, you can then check the box in the COM-AddIn screen to have it load which then should prompt you more detail since you set the VSTO_SUPPRESSDISPLAYALERTS variable about what may have happened in the first place.

这篇关于如何解决VSTO插件不加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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