Excel add-in fails with 0x8004063E

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 03:41:31

问题


I have an Excel add in which used to work perfectly. Lately, many customers received the following error (in the end of this question).

Environment details:

  • Windows 7/8 64 bit.
  • Microsoft Office 2013 64 bit
  • Add in is compiled under .net 3.5

Any help will be highly appreciated.

Exception from HRESULT: 0x8004063E

********** Exception Text ********** System.Runtime.InteropServices.COMException (0x8004063E): Exception from HRESULT: 0x8004063E at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode, IntPtr errorInfo) at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, Boolean useFastPath, IntPtr& executor) at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IDomainCreator.CreateCustomizationDomain(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, IntPtr& executor)


回答1:


I was facing same exception for outlook add-in.

with Environment:

  1. Windows 7 64 bit. Microsoft outlook 2013 64 bit Add in is compiled
    under .net 4.5 VS 2013

Compiled add-in under .net 4.0 fixed the issue.




回答2:


Building with a different .NET framework didn't help for us, and isn't a reliable option anyways since we need .NET 4.5.

Reinstalling Visual Studio Tools for Office Runtime made the problem disappear in some instances. Dancing clockwise around the campfire three times, chanting "vee-store" also sometimes helps, but not all of our customers have campfires.

It seems the use case that fails for us is Windows 7, Office 2010, allow Office to register for updates via Windows Updates, VSTOR is installed via Windows Updates, .NET Framework is installed after VSTOR. This is the case where we get this error. Re-installing VSTOR fixes it for us.

Another problem seems to be that our earlier alpha versions used the ClickOnce installation, and later versions used an MSI installer. If the ClickOnce alpha version threw an exception during startup and got itself blacklisted with Excel, it would cause the MSI installation to fail. Searching the registry for our add-in name found extra spots in the HKCU and HKLM which conflicted.



来源:https://stackoverflow.com/questions/25389330/excel-add-in-fails-with-0x8004063e

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!