[英]Outlook addin not loading up on Win10 Office2016
I know that there are multiple posts, blogs etc related to same issue but none of them helped me thus I'm posting this question here for some expert opinion. 我知道有多个帖子,博客等与同一问题相关,但是它们都没有帮助我,因此我在此发布此问题以征求专家意见。
Environment: Windows 10, Office 2016, .Net Framework 4.5.1, Visual Studio 2010 Tools for Office runtime
My outlook addin works perfectly fine on Win7, Win8.1, Outlook 2013, 2016. 我的Outlook外接程序在Win7,Win8.1,Outlook 2013、2016上运行良好。
Issue: Outlook add-in is not loading up on outlook startup, I see that LoadBehaviour is changing from 3 to 2. When I double-click and install the .vsto file from the installed location that time add-in is installed successfully but still the add-in is not loaded up during outlook startup. 问题: Outlook加载项未在Outlook启动时加载,我看到LoadBehaviour从3变为2。当我双击并从安装位置安装.vsto文件时,该时间加载项已成功安装,但仍然Outlook启动期间未加载该加载项。
I have followed all the steps provided by Hamed Ahmadi in his blog . 我已经按照Hamed Ahmadi在他的博客中提供的所有步骤进行操作。 But none of them helped.
但是他们都没有帮助。
Fusion logs: 融合日志:
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.
I'm not that used to reading fusion logs thus unable to deduct what it is saying. 我不是以前用来阅读融合日志的人,因此无法推断出它的意思。
I tired AddinSpy by using this Github Code , but for my add-in i get this exception. 通过使用此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
Note: When I try to run the add-in code from visual studio on this Win10 Office 2016 environment, the add-in is loading up properly, no issues there. 注意:当我尝试在此Win10 Office 2016环境中从Visual Studio运行加载项代码时,加载项已正确加载,那里没有任何问题。
I'm using .msi to deploy my add-in and I have had it tested on Win7, Win8.1 and its working fine on these environments. 我正在使用.msi部署我的加载项,并且已经在Win7,Win8.1上对其进行了测试,并且可以在这些环境下正常工作。
Any clue what might be going wrong ? 任何线索可能出什么问题了吗?
Finally, I was able to solve my issue. 最后,我能够解决我的问题。
Problem was with the registry entry which I had in the Visual Studio Installer project. 我在Visual Studio安装程序项目中遇到的注册表项存在问题。
I was using [INSTALLDIR]PhishLabs.OutlookAddin.vsto|vstolocal
which worked perfectly fine in Win7, Win8.1 deployments but in Win10 it was failing. 我使用的是
[INSTALLDIR]PhishLabs.OutlookAddin.vsto|vstolocal
,在Win7,Win8.1部署中运行正常,但在Win10中却失败了。
I had replaced INSTALLDIR
with TARGETDIR
which is working fine now on Win10. 我已经用
TARGETDIR
替换了INSTALLDIR
,现在在Win10上运行良好。
[TARGETDIR]PhishLabs.OutlookAddin.vsto|vstolocal
is what you need. [TARGETDIR]PhishLabs.OutlookAddin.vsto|vstolocal
您需要的是[TARGETDIR]PhishLabs.OutlookAddin.vsto|vstolocal
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.