Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
288 views
in Technique[技术] by (71.8m points)

c# - Deploying/Installing an outlook addin

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.

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

EDIT:

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

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:

enter image description here

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

Still stumped!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think this tutorial might be useful for your reference.

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

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...