[英]Outlook disables VSTO addin, complains of load time
I have a very strange problem with an AddIn I developed. 我开发的AddIn有一个非常奇怪的问题。
Clients complain of the AddIn being disabled by outlook because of slow loading times but in my code (1.2s on avrg), I don't have any other custom codes running during start up apart from AddIn Express generated code which can be seen below. 客户抱怨AddIn由于加载速度慢而被Outlook禁用,但是在我的代码(avrg中为1.2s)中,除了AddIn Express生成的代码(如下所示)外,启动期间我没有运行任何其他自定义代码。
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
logger.Debug("Startup called");
this.AddInStartup();
#region Add-in Express Regions generated code - do not modify
this.FormsManager = AddinExpress.OL.ADXOlFormsManager.CurrentInstance;
this.FormsManager.OnInitialize += new AddinExpress.OL.ADXOlFormsManager.OnComponentInitialize_EventHandler(this.FormsManager_OnInitialize);
this.FormsManager.Initialize(this);
#endregion
logger.Debug("Exit Startup");
}
Also, I have a ribbon Ribbon (Button), that gets loaded. 另外,我有一个功能区Ribbon(按钮),该功能区已加载。
All functionality codes for the addIn such as login, webservice calls are only performed when outlook is opened with the Ribbon button clicked. addIn的所有功能代码(例如登录,Web服务调用)仅在单击功能区按钮打开Outlook时执行。
Are there any underlying issues i may have looked past or possible external reasons not related to my code where outlook will complain of my addIn starting up slow when all that happens is just the ribbon being loaded during outlook start time ? 我可能已经看过任何潜在的问题,或者可能是与代码无关的外部原因,当仅在Outlook启动时加载功能区时,Outlook会抱怨我的addIn启动缓慢?
There are multiple reasons why your add-in starts slowly.... 加载项启动缓慢的原因有多种。
But the very first thing to start with is to remove any Add-in Express code and see how much time it takes to load. 但是首先要开始的是删除所有Add-in Express代码,并查看加载所需的时间。 Do you get the same picture with a newly created add-in project without Add-in Express assemblies? 在没有Add-in Express程序集的情况下,新创建的外接程序项目是否得到相同的图片?
I'd suggest applying common approaches for increasing the overall add-in performance such as: 我建议采用通用方法来提高整体加载项性能,例如:
See Application Startup Time for more information. 有关更多信息,请参见应用程序启动时间 。 Also take a look at tje following pages: 还请看以下几页:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.