簡體   English   中英

Outlook外接程序無法在Win10 Office2016上加載

[英]Outlook addin not loading up on Win10 Office2016

我知道有多個帖子,博客等與同一問題相關,但是它們都沒有幫助我,因此我在此發布此問題以征求專家意見。

Environment: Windows 10, Office 2016, .Net Framework 4.5.1, Visual Studio 2010 Tools for Office runtime

我的Outlook外接程序在Win7,Win8.1,Outlook 2013、2016上運行良好。

問題: Outlook加載項未在Outlook啟動時加載,我看到LoadBehaviour從3變為2。當我雙擊並從安裝位置安裝.vsto文件時,該時間加載項已成功安裝,但仍然Outlook啟動期間未加載該加載項。

我已經按照Hamed Ahmadi在他的博客中提供的所有步驟進行操作。 但是他們都沒有幫助。

融合日志:

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Windows\syswow64\MsiExec.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Program Files (x86)\myaddin\myaddin.OutlookAddin\myaddin.OutlookAddin.dll
LOG: Appbase = file:///C:/Windows/syswow64/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MsiExec.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Users\anupraj\AppData\Local\Temp\CFG1405.tmp
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/myaddin/myaddin.OutlookAddin/myaddin.OutlookAddin.dll.
LOG: Assembly download was successful. Attempting setup of file: C:\Program Files (x86)\myaddin\myaddin.OutlookAddin\myaddin.OutlookAddin.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: myaddin.OutlookAddin, Version=1.0.4.0, Culture=neutral, PublicKeyToken=08126df2ce1c130e
LOG: Re-apply policy for where-ref bind.
LOG: Post-policy reference: myaddin.OutlookAddin, Version=1.0.4.0, Culture=neutral, PublicKeyToken=08126df2ce1c130e
LOG: GAC Lookup was unsuccessful.
LOG: Where-ref bind Codebase does not match what is found in default context. Keep the result in LoadFrom context.
LOG: Binding succeeds. Returns assembly from C:\Program Files (x86)\myaddin\myaddin.OutlookAddin\myaddin.OutlookAddin.dll.
LOG: Assembly is loaded in LoadFrom load context.

我不是以前用來閱讀融合日志的人,因此無法推斷出它的意思。

通過使用此Github代碼 ,我對AddinSpy感到厭倦,但是對於我的加載項,我得到了此異常。

System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.BitConverter.ToInt32(Byte[] value, Int32 startIndex)
   at AddInSpy.ILReader.Next() in e:\POC\AddInSpy-master\AddInScanEngine\ILReader.cs:line 79
   at AddInSpy.ILReader.<GetEnumerator>d__0.MoveNext() in e:\POC\AddInSpy-master\AddInScanEngine\ILReader.cs:line 51
   at AddInSpy.AssemblyScanner.CheckCustomTaskPaneType(Assembly assembly, ArrayList& assemblyInfo) in e:\POC\AddInSpy-master\AddInScanEngine\AssemblyScanner.cs:line 251

注意:當我嘗試在此Win10 Office 2016環境中從Visual Studio運行加載項代碼時,加載項已正確加載,那里沒有任何問題。

我正在使用.msi部署我的加載項,並且已經在Win7,Win8.1上對其進行了測試,並且可以在這些環境下正常工作。

任何線索可能出什么問題了嗎?

最后,我能夠解決我的問題。

我在Visual Studio安裝程序項目中遇到的注冊表項存在問題。

我使用的是[INSTALLDIR]PhishLabs.OutlookAddin.vsto|vstolocal ,在Win7,Win8.1部署中運行正常,但在Win10中卻失敗了。

我已經用TARGETDIR替換了INSTALLDIR ,現在在Win10上運行良好。

[TARGETDIR]PhishLabs.OutlookAddin.vsto|vstolocal您需要的是[TARGETDIR]PhishLabs.OutlookAddin.vsto|vstolocal

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM