Office 64位的VSTO-延迟加载 [英] VSTO for Office 64-bit - Delayed Load
问题描述
有关导致Office加载项内部延迟的任何想法.为WORD2010,AnyCPU编译了C#64位COM版本.
Any ideas on what causes a delay inside Office Add-in. Compiled C# 64-bit COM version for WORD2010, AnyCPU.
加载了这些命名空间.完美编译.问题是当C#调用大型C#模块时,会有14秒的延迟
Loaded these namespaces. Compiles perfectly. Problem is when C# calls a large C# module there is 14 second delay
带有蓝色纺车.然后Word正常进行.二次呼叫,Word或加载项已加载了一些内容,没有延迟.
with blue spinning wheel. Then Word proceeds normally. Second call, Word or Add-in has loaded something and no delay.
使用系统;
使用System.Reflection;
使用System.Net.Configuration;
使用System.Collections;
使用System.Collections.Generic;
使用System.Collections.ObjectModel;
使用System.Collections.Concurrent;
使用System.Runtime.InteropServices;
使用System.Runtime.Serialization;
使用System.Windows.Forms;
使用System.Linq;
使用System.Text;
使用System.Xml.Linq;
使用Word = Microsoft.Office.Interop.Word;
使用Office = Microsoft.Office.Core;
使用Microsoft.Office.Tools.Word;
使用Microsoft.Office.Interop.Word;
使用Microsoft.Win32;
使用Microsoft.Office.Core;
使用System.Media;
使用System.IO;
使用System.Security.Permissions;
using System;
using System.Reflection;
using System.Net.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Concurrent;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Windows.Forms;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Word = Microsoft.Office.Interop.Word;
using Office = Microsoft.Office.Core;
using Microsoft.Office.Tools.Word;
using Microsoft.Office.Interop.Word;
using Microsoft.Win32;
using Microsoft.Office.Core;
using System.Media;
using System.IO;
using System.Security.Permissions;
ThisAddin 类中的可疑集合.也许必须预先加载Array()类?
Suspect Collections in ThisAddin class. Perhaps must be preloaded Array() class?
公共静态只读ReadOnlyCollection < string> people_jobs =新的ReadOnlyCollection< string>(
新字符串[] {
操作员",人",人",驾驶员",技术员",驾驶员",副驾驶员",医师",医生",患者" ;});
public static readonly ReadOnlyCollection<string> people_jobs = new ReadOnlyCollection<string>(
new string[] {
"operator","person","people","driver","technician","pilot","co-pilot","physician","doctor","patient"});
是否有任何开发人员看到此延迟问题?欢迎评论.
Has any developer see this delay problem? Comments most welcome.
受控英语翻译人员.
推荐答案
你好,
看到延迟的原因可能有多种...
There can be various reasons why you see a delay...
Take a look at the similar forum thread - Outlook freeze when loading an VSTO Addin, where performance issues are discussed with steps for investigating possible causes. Though it is related to Outlook add-ins, but the same steps can be applied to Word add-ins.
这篇关于Office 64位的VSTO-延迟加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!