自定义 Outlook 加载项未显示
Custom Outlook add-in is not showing
我使用 VSTO 开发了 outlook 插件,插件是使用 Visual Studio 安装程序安装的。安装后,我可以在 outlook 中看到自定义加载项已安装(在 File-Option-Add-Ins 中可见,当然它是允许的)但它没有显示在功能区中。当我 运行 VS 中的项目时,我可以看到 outlook 正在启动并在调试器处停止。
http://pastebin.com/cWrfUSa8 - 这是初始化功能区、选项卡和按钮时的部分。当调试器打开时,代码也会在那里停止。请注意,功能区是使用设计器方式生成的,而不是 xml.
我已经在 SO 上检查了这个问题,LoadBehaviour 注册表项已从 2 正确更改为 3。
Not Showing Outlook Addin
我也根据这个启用了环境变量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
让我们忽略短得离谱的阈值时间并继续我的故事 -> 按照这个 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
我修改了 regedit 并且 outlook 中的 UI 在文件 -> 慢速和禁用的 COM 加载项
中发生了变化
但仍然无法在 Outlook 中显示加载项。我现在没主意了。
编辑:
我很好奇为什么事件日志显示的 Time Taken 与 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
未显示加载项是由于 ThisAddIn.cs
中缺少覆盖造成的
protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
return new Ribbon1();
}
功能区需要使用 xml 而非设计器生成才能应用此解决方案。 guid 中的空值未解决,HKLM:0 也未解决。但是加载项现在显示在 outlook 中。
我使用 VSTO 开发了 outlook 插件,插件是使用 Visual Studio 安装程序安装的。安装后,我可以在 outlook 中看到自定义加载项已安装(在 File-Option-Add-Ins 中可见,当然它是允许的)但它没有显示在功能区中。当我 运行 VS 中的项目时,我可以看到 outlook 正在启动并在调试器处停止。
http://pastebin.com/cWrfUSa8 - 这是初始化功能区、选项卡和按钮时的部分。当调试器打开时,代码也会在那里停止。请注意,功能区是使用设计器方式生成的,而不是 xml.
我已经在 SO 上检查了这个问题,LoadBehaviour 注册表项已从 2 正确更改为 3。 Not Showing Outlook Addin
我也根据这个启用了环境变量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
让我们忽略短得离谱的阈值时间并继续我的故事 -> 按照这个 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 我修改了 regedit 并且 outlook 中的 UI 在文件 -> 慢速和禁用的 COM 加载项
中发生了变化但仍然无法在 Outlook 中显示加载项。我现在没主意了。
编辑: 我很好奇为什么事件日志显示的 Time Taken 与 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
未显示加载项是由于 ThisAddIn.cs
中缺少覆盖造成的protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
return new Ribbon1();
}
功能区需要使用 xml 而非设计器生成才能应用此解决方案。 guid 中的空值未解决,HKLM:0 也未解决。但是加载项现在显示在 outlook 中。