2017-03-06 116 views
2

我有用VSTO開發的Outlook加載項,並且使用Visual Studio安裝程序安裝加載項。安裝後,我可以在Outlook中看到自定義加載項已安裝(在File-Option-Add-Ins中可見,當然它允許),但它未顯示在功能區中。當我在VS中運行項目時,我可以看到Outlook正在啓動並停在調試器。未顯示自定義Outlook加載項

Outlook AddIn Settings

http://pastebin.com/cWrfUSa8 - 這是部分當色帶,標籤,該按鈕被初始化。代碼在調試器打開時也停在那裏。請注意,功能區是以設計者的方式生成的,而不是xml。

我檢查了SO上的這個問題,LoadBehaviour regkey正在從2更改爲3。 Not Showing Outlook Addin

regedit settings

我也根據這個Not Showing Outlook Addin使環境變量,但都顯示任何錯誤。

在事件查看器伊夫挖一點後,發現這一點:

> Outlook disabled the following add-in(s): 



> ProgID: Tieto.MRS.OutlookAddin2013 
GUID: {00000000-0000-0000-0000-000000000000} 
Name: Tieto.MRS.OutlookAddin2013 
Description: Tieto.MRS.OutlookAddin2013 
Load Behavior: 3 
HKLM: 0 
Location: file:///c:/_hg/tieto.meetingroomselector/main/source/tieto.mrs.outloookaddin2013/tieto.mrs.outlookaddin2013/tieto.mrs.outlookaddin2013/bin/release/tieto.mrs.outlookaddin2013.vsto|vstolocal 
Threshold Time (Milliseconds): 1000 
Time Taken (Milliseconds): 1063 
Disable Reason: This add-in caused Outlook to start slowly. 
Policy Exception (Allow List): 0 

可以忽略可笑的短臨界時間,並繼續我的故事 - >下面這個帖子https://support.microsoft.com/en-us/help/2733070/no-add-ins-loaded-due-to-group-policy-settings-for-office-2013-and-office-2016-programs 伊夫修改了註冊表編輯器,並在UI展望文件已經改變 - >慢和禁用COM加載項

Outlook UI

但仍然顯示在Outlook中加載沒有運氣。我現在沒有想法。

編輯: 我很好奇爲什麼事件日誌顯示不同的時間比用戶界面的時間。假設事件日誌告訴我真相,我已經在少數幾個點上添加了多線程(功能區初始化,配置被加載等),事實上事件日誌中的警告消失了。

但不幸的是,仍然沒有運氣。

Outlook loaded the following add-in(s): 
Name: Tieto.MRS.OutlookAddin2013 
Description: Tieto.MRS.OutlookAddin2013 
ProgID: Tieto.MRS.OutlookAddin2013 
GUID: {00000000-0000-0000-0000-000000000000} 
Load Behavior: 3 
HKLM: 0 
Location: file:///C:/_Hg/Tieto.MeetingRoomSelector/Main/Source/Tieto.MRS.OutloookAddin2013/Tieto.MRS.OutlookAddin2013/Tieto.MRS.OutlookAddin2013/bin/Release/Tieto.MRS.OutlookAddin2013.vsto|vstolocal 
Boot Time (Milliseconds): 281 

EDIT2

創建以下像以前這個簡單guide 情景一樣一個新的項目。插件安裝,允許但不顯示。

EDIT3

注意到,GUID在事件查看器是零和HKLM是0,其它加載項具有有效的GUID和HKLM:1

回答

1

將不顯示加載與引起ThisAddIn.cs中丟失覆蓋

protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject() 
{ 
    return new Ribbon1(); 
} 

功能區需要使用xml生成,而不是設計人員應用此解決方案。 guid中的空值沒有被解決,但是HKLM:0都沒有解決。但是插件顯示在前景中。

相關問題