自定义 Outlook 加载项未显示 [英] Custom Outlook add-in is not showing
问题描述
我有使用 VSTO 开发的 Outlook 插件,并且插件是使用 Visual Studio 安装程序安装的.安装后,我可以在 Outlook 中看到自定义加载项已安装(在 File-Option-Add-Ins 中可见,当然它是允许的)但它没有显示在功能区中.当我在 VS 中运行项目时,我可以看到 Outlook 正在启动并在调试器处停止.
我还根据此
但仍然没有运气在 Outlook 中显示加载项.我现在想不通了.
我很好奇为什么事件日志显示的时间与 Outlook 的 UI 不同.假设事件日志说的是实话,我在几个点(功能区初始化的位置,配置加载的位置等)添加了多线程,并且事件日志中的警告确实消失了.
但不幸的是,仍然没有运气.
Outlook 加载了以下加载项:名称:Tieto.MRS.OutlookAddin2013描述:Tieto.MRS.OutlookAddin2013ProgID:Tieto.MRS.OutlookAddin2013GUID:{00000000-0000-0000-0000-000000000000}负载行为:3港币:0位置:file:///C:/_Hg/Tieto.MeetingRoomSelector/Main/Source/Tieto.MRS.OutloookAddin2013/Tieto.MRS.OutlookAddin2013/Tieto.MRS.OutlookAddin2013/bin/Release/Tieto.MRS.3Outlook.Addin201|对本地启动时间(毫秒):281
EDIT2
按照这个简单的 指南和以前一样的场景.已安装加载项,允许但不显示.
EDIT3
注意到事件查看器中的 GUID 为零,HKLM 为 0.其他加载项具有有效的 guid 和 HKLM:1
未显示加载项是由于缺少 ThisAddIn.cs 中的覆盖造成的
protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject(){返回新的 Ribbon1();}
功能区需要使用 xml 生成,而不是与设计器一起生成以应用此解决方案.guid 中的空值没有解决,HKLM: 0 也没有解决.但是加载项现在显示在 Outlook 中.
I have the outlook add-in developed with VSTO and the add-in is installed using Visual Studio Installer. After installation I can see in the outlook that the custom add-in is installed (visible in File-Option-Add-Ins and of course its allowed) but its not showing in the ribbon. When I run the project in VS I can see that the outlook is being started and it stops at the debugger.
http://pastebin.com/cWrfUSa8 - this is the part when the ribbon, tab and the button is being initialized. The code stops there also when the debugger is on. Please note that the Ribbon was generated with designer way not an xml.
I have checked this question on SO and the LoadBehaviour regkey is being changed from 2 to 3 correctly. Not Showing Outlook Addin
I also enabled the environment variable according this Not Showing Outlook Addin but any errors are displayed.
After little bit of digging in event viewer Ive found this:
> 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
lets ignore the ridiculously short treshold time and continue with my story -> following this post https://support.microsoft.com/en-us/help/2733070/no-add-ins-loaded-due-to-group-policy-settings-for-office-2013-and-office-2016-programs Ive modified the regedit and the UI in outlook has changed in File -> Slow and Disabled COM Add-ins
but still no luck with showing the add-in in outlook. I am now out of idea.
EDIT: I was curious why event log is showing different Time Taken than an UI of outlook. Asuming that the eventlog is telling the truth I have added multithread on few spots(where ribbon is initialized, where the config is loaded etc.) and indeed the warning in eventlog disappeared.
But unfortunately, still no luck.
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
Created a new project following this simple guide Same scenario like before. Add-In installed, allowed but not showing.
EDIT3
Noticed that the GUID in event viewer are zeros and the HKLM is 0. Other add-ins have valid guid and HKLM: 1
The not showing add-in was caused with missing override in ThisAddIn.cs
protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
return new Ribbon1();
}
The ribbon needs to be generated using xml not with the designer to apply this solution. The nulls in guid wasnt solved, neither the HKLM: 0. However the add-in is showing in outlook now.
这篇关于自定义 Outlook 加载项未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!