Outlook Com 加载项部署和 可扩展性问题
我是一名使用 C#、Visual Studio 2005 编写 Outlook2003/2007 加载项的开发人员。我还使用 COM 加载项向导(不使用 VSTO,我有 Connect.cs)。 该程序在我的计算机上安装了 Visual Studio 的情况下成功运行,但是当我尝试部署该软件时,我遇到了奇怪的行为。
我设置了一个日志系统,将一些 Extensibility.IDTExtensibility2 事件(OnBeginShutdown、OnDisconnection、OnConnection 和 OnStartupComplete)写入日志文件。 当我在已部署的计算机上运行 Outlook 时,我的加载项无法启动。 但是,当我退出 Outlook 时,我确实在日志中看到了数据,但它显示仅触发了 OnDisconnection 和 OnBeginShutdown 事件。 为什么 OnConnection 和 OnStartupComplete 没有触发? 我担心它是引用/DLL 问题,但为什么会触发其他事件而不是这两个事件?
I'm a developer writing an add-in for Outlook2003/2007 using C#, Visual Studio 2005. I'm also using the COM add-in wizard (not using VSTO, I have a Connect.cs). The program successfully runs with visual studio installed on my machine but when I try to deploy the software I am getting weird behavior.
I have a logging system set up to write a few Extensibility.IDTExtensibility2 events (OnBeginShutdown, OnDisconnection, OnConnection, and OnStartupComplete) to a log file. When I run Outlook on the deployed machine my add-in does not startup up. However, when I exit Outlook I do see data in my log, but its showing that only the events OnDisconnection and OnBeginShutdown were fired. How come OnConnection and OnStartupComplete are not firing? I'm worried its a references/DLL issue but why would the other events fire and not these two?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我想通了,对于可能遇到此问题的任何人:我们将托管 dll 设置为注册互操作(在项目属性中)...确保未选中此框! 这覆盖了垫片注册
ok i figured it out, for anyone out there who may run into this: we had our managed dll set to register for interop (in project properties)...make sure this box is unchecked! This was overriding the shim registration