Outlook 2013,Visual Studio 2015和VSTO - 插件未在Outlook中显示 [英] Outlook 2013, Visual Studio 2015 and VSTO - addin is not showing in Outlook

查看:133
本文介绍了Outlook 2013,Visual Studio 2015和VSTO - 插件未在Outlook中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在尝试使用VSTO在Outlook中传播插件,但没有运气。没有错误,Outlook-File-AddIns中可以看到加载项。它允许并安装。但是,如果我查看事件查看器,我可以看到一些可疑的东西:



名称:OutlookAddin2013

描述:OutlookAddin2013

ProgID:OutlookAddin2013

GUID:{00000000-0000-0000-0000-000000000000}

加载行为:3

HKLM:0

位置:file:/// ********* / TOutlookAddin2013 / OutlookAddin2013 / bin / Release /OutlookAddin2013.vsto | vstolocal

启动时间(毫秒):610


其他工作加载项(由第三方公司安装)没有指示guid和HKLM设置为1.如何以同样的方式进行?


____________________________________________________________________



  ; ThisAddIn.cs



        

  [ComVisible(true)]

    [Guid(" 5b53bb90-87b0-419f-bdbf-5559d4c2c4af")]¥b $ b   公共部分课程ThisAddIn

    {

        private void ThisAddIn_Startup(object sender,System.EventArgs e)

        {

        }


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

        {

            //注意:Outlook不再引发此事件。如果你有代码 

            //   必须在Outlook关闭时运行,请参阅http://go.microsoft.com/fwlink/?LinkId=506785

        }


        #region VSTO生成的代码



  &NBSP; &NBSP; &NBSP; ///< summary>

  &NBSP; &NBSP; &NBSP; ///支持Designer的必需方法 - 请勿修改

  &NBSP; &NBSP; &NBSP; ///使用代码编辑器的方法内容。

  &NBSP; &NBSP; &NBSP; ///< / summary>

  &NBSP; &NBSP; &NBSP; private void InternalStartup()

  &NBSP; &NBSP; &NBSP; {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; this.Startup + = new System.EventHandler(ThisAddIn_Startup);

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; this.Shutdown + = new System.EventHandler(ThisAddIn_Shutdown);

  &NBSP; &NBSP; &NBSP; }


  &NBSP; &NBSP; &NBSP; #endregion

  &NBSP; }


________________________________________________________________



Ribbon.Designer.cs


  [ComVisible(true)]

  &NBSP; [Guid(" 5b53bb90-87b0-419f-bdbf-5559d4c2c4af")]¥b $ b  &NBSP; partial class MRSRibbon:Microsoft.Office.Tools.Ribbon.RibbonBase

{

///< summary>

///所需的设计器变量。

///< / summary>

private System.ComponentModel.IContainer components = null;

private Microsoft.Office.Tools.Ribbon.RibbonTab tabMRS;

private Microsoft.Office.Tools.Ribbon.RibbonGroup mrsRibbonGroup;

私有Microsoft.Office.Tools.Ribbon.RibbonButton chooseMeetingRoomsButton;



public MRSRibbon()

:base(Globals.Factory.GetRibbonFactory())

{

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; new System.Threading.Thread(()=>

       {

      ;    InitializeComponent();

      })。Start(); &NBSP; &NBSP;   

}



///< summary> 

///清理任何正在使用的资源。

///< / summary>

///< param name =" disposing">如果应处理托管资源,则为true;否则,false。< / param>

受保护的覆盖无效Dispose(bool disposing)

< span style ="white-space:pre"> {

if(disposing&&(components!) = null)))
{

components.Dispose();

}

base.Dispose(disposing);

}





}




解决方案

您好,


您是如何在机器上安装插件的?您是否使用过MSI安装程序?


首先,确保在目标计算机上添加了所有必需的Windows注册表项,请参阅

应用程序级加载项的注册表项
了解更多以下文章深入介绍了如何为Office COM加载项创建安装程序:


使用ClickOnce部署Office解决方案


使用Windows Installer部署Office解决方案


< span style =""> Microsoft Office应用程序可以禁用意外行为的VSTO加载项。如果应用程序未加载VSTO加载项,则应用程序可能已禁用硬件或软件禁用VSTO加载项。


硬件当VSTO加载项导致应用程序意外关闭时,可能会发生禁用。如果在  启动   事件VSTO加载项中的
处理程序是执行。


当VSTO加载项产生的错误不会导致应用程序意外关闭时,可能会发生软禁用。例如,如果应用程序在  Startup   事件
handler是执行。


当您重新启用软禁用的VSTO加载项时,应用程序会立即尝试加载VSTO加载项。如果最初导致应用程序软件禁用VSTO加载项的问题尚未修复,则应用程序将软化
再次禁用VSTO加载项。有关详细信息,请参阅
如何:重新启用VSTO添加 - 已被禁用
文章。


您是否收到任何UI错误?


默认情况下,如果VSTO加载项尝试操作Microsoft Office用户界面(UI)并失败,则不会显示任何错误消息。但是,您可以将Microsoft Office应用程序配置为显示与UI
相关的错误消息。您可以使用这些消息来帮助确定未显示自定义功能区的原因,或者为何显示功能区但未显示控件的原因。请参阅

如何:显示加载项用户界面错误



Hello,

I am trying to propagate the addin in outlook using VSTO but with no luck. There are no errors, add-in is visible in Outlook-File-AddIns. Its allowed and installed. However if I check the eventviewer I can see some fishy things:

Name: OutlookAddin2013
Description: OutlookAddin2013
ProgID: OutlookAddin2013
GUID: {00000000-0000-0000-0000-000000000000}
Load Behavior: 3
HKLM: 0
Location: file:///*********/TOutlookAddin2013/OutlookAddin2013/bin/Release/OutlookAddin2013.vsto|vstolocal
Boot Time (Milliseconds): 610

Other working add-ins (installed by the 3rd party companies) have not zeroes guid and HKLM set to 1. How to do it same way?

____________________________________________________________________

 ThisAddIn.cs

        

 [ComVisible(true)]
    [Guid("5b53bb90-87b0-419f-bdbf-5559d4c2c4af")]
    public partial class ThisAddIn
    {
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
        }

        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
            // Note: Outlook no longer raises this event. If you have code that 
            //    must run when Outlook shuts down, see http://go.microsoft.com/fwlink/?LinkId=506785
        }

        #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
    }

________________________________________________________________

Ribbon.Designer.cs

  [ComVisible(true)]
    [Guid("5b53bb90-87b0-419f-bdbf-5559d4c2c4af")]
    partial class MRSRibbon : Microsoft.Office.Tools.Ribbon.RibbonBase
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
private Microsoft.Office.Tools.Ribbon.RibbonTab tabMRS;
private Microsoft.Office.Tools.Ribbon.RibbonGroup mrsRibbonGroup;
private Microsoft.Office.Tools.Ribbon.RibbonButton chooseMeetingRoomsButton;

public MRSRibbon()
: base(Globals.Factory.GetRibbonFactory())
{
            new System.Threading.Thread(() =>
            {
                InitializeComponent();
            }).Start();       
}

/// <summary> 
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}


}

解决方案

Hello,

How did you install the plug-in on the machine? Did you use an MSI installer?

First of all, make sure that all the required windows registry keys were added on the target machine, see Registry Entries for Application-Level Add-Ins for more information.

The following articles describe in depth how to create an installer for Office COM add-ins:

Deploying an Office Solution by Using ClickOnce

Deploying an Office Solution by Using Windows Installer

Microsoft Office applications can disable VSTO Add-ins that behave unexpectedly. If an application does not load your VSTO Add-in, the application might have hard disabled or soft disabled your VSTO Add-in.

Hard disabling can occur when an VSTO Add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your VSTO Add-in is executing.

Soft disabling can occur when a VSTO Add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable a VSTO Add-in if it throws an unhandled exception while the Startup event handler is executing.

When you re-enable a soft-disabled VSTO Add-in, the application immediately attempts to load the VSTO Add-in. If the problem that initially caused the application to soft disable the VSTO Add-in has not been fixed, the application will soft disable the VSTO Add-in again. Read more about that in the How to: Re-enable a VSTO Add-in That Has Been Disabled article.

Do you get any UI errors?

By default, if an VSTO Add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom Ribbon does not appear, or why a Ribbon appears but no controls appear. See How to: Show Add-in User Interface Errors .


这篇关于Outlook 2013,Visual Studio 2015和VSTO - 插件未在Outlook中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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