部署/安装 Outlook 插件 [英] Deploying/Installing an outlook addin

查看:121
本文介绍了部署/安装 Outlook 插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在客户端计算机上安装我的 Outlook 插件.

I am trying to install my Outlook Addin on client computers.

不幸的是,加载项永远无法启用",它始终显示在禁用加载项"部分.

Unfortuantely, the Add-in can never be 'Enabled' it is always shown in the Disabled add-in section.

是否有关于如何创建正确的安装应用程序和安装 Outlook 插件的简单分步指南?

Is there a simple, step by step guide on how to create the correct setup application and install an outlook addin?

好的,我回到了基础,但我仍然无法正确安装它.

Ok so ive gone back to basics, but i still cant get it to install correctly.

我使用 VS2010 项目向导创建了一个新的 Outlook 插件.

I create a new Outlook Addin using VS2010 project wizard.

它生成文件等,然后我像这样更改代码:

It generates files etc, and then i change my code like so:

namespace OutlookAddIn1
{
    public partial class ThisAddIn
    {
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            MessageBox.Show("Worked");
        }

        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
        }

        #region VSTO generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
        }

        #endregion
    }

如果我安装了这个,我会收到同样的错误信息:

If i install this one, i get the same error message:

Not Loaded. The Managed Add-in Loader failed to initialize.

安装插件时,我确保创建了注册表项:

When installing the Add-in I ensure the registry keys are created:

我还向安装项目添加了 .manifest 文件和 .vsto 文件.

I have also added the .manifest file and the .vsto file to the Setup project.

还是被难住了!

推荐答案

我认为本教程可能对您的参考有用.

I think this tutorial might be useful for your reference.

http://msdn.microsoft.com/en-us/library/ff937654.aspx

此外,您可能还想查看其他一些内容.首先,查看在启动 Outlook Addin 时是否抛出了任何 COM 异常.如果插件在启动时抛出错误,通常不会自动禁用它.并且您还想查看 loadBehavior 注册表项并查看您在那里获得了哪些值.

Also, there are a few other things that you might want to check out. First, see if you have any COM exceptions thrown when you start up Outlook Addin. Normally addin will not be disabled automatically if it throws errors on startup. And you also want to have a look at loadBehavior registry key and see what values you got in there.

LoadBehavior reg key 详情请参考:http://msdn.microsoft.com/en-us/library/bb386106(VS.100).aspx

For details of LoadBehavior reg key, please refer to: http://msdn.microsoft.com/en-us/library/bb386106(VS.100).aspx

这篇关于部署/安装 Outlook 插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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