Outlook 2010 加载项无法使用来自 HRESULT 的错误异常:0x8004063E
Outlook 2010 Add-In not working with error Exception from HRESULT: 0x8004063E
我们有一个 Outlook 2010 加载项,在使用 .NET Framework 4.0 之前运行良好。 .NET Framework 升级到 4.5.2 后,它在一些用户的机器上停止加载(这个问题不是每个人都会出现,在我的机器上工作正常)。在阅读了几篇博客后,我将 0 的值分配给用户机器中的环境变量 VSTO_SUPPRESSDISPLAYALERTS 并在打开 Outlook 并尝试加载我们的添加时出现以下错误-在:
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)
我们无法使用 .Net Framework 4.0,我们必须使用 4.5.2。我也曾尝试删除注册表项 HKEY_CURRENT_USER\Software\Microsoft\VSTO\SolutionMetadata 并重新安装加载项,但这没有用。
但是,我注意到的一件事是用户的计算机在上述注册表项下没有值 PreferredClr。它只包含一个名为 compatibleFrameworks 的值,其中包含数据:
<compatibleFrameworks xmlns=\"urn:schemas-microsoft-com:clickonce.v2\">
<framework targetVersion=\"4.5.2\" profile=\"Full\" supportedRuntime=\"4.0.30319\" />
</compatibleFrameworks>
如有任何帮助,我们将不胜感激。谢谢!
P.S:所有机器都在使用Windows 7.
重新安装 Microsoft Visual Studio 2010 Tools for Office Runtime (x64) 解决了问题。
我们有一个 Outlook 2010 加载项,在使用 .NET Framework 4.0 之前运行良好。 .NET Framework 升级到 4.5.2 后,它在一些用户的机器上停止加载(这个问题不是每个人都会出现,在我的机器上工作正常)。在阅读了几篇博客后,我将 0 的值分配给用户机器中的环境变量 VSTO_SUPPRESSDISPLAYALERTS 并在打开 Outlook 并尝试加载我们的添加时出现以下错误-在:
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)
我们无法使用 .Net Framework 4.0,我们必须使用 4.5.2。我也曾尝试删除注册表项 HKEY_CURRENT_USER\Software\Microsoft\VSTO\SolutionMetadata 并重新安装加载项,但这没有用。 但是,我注意到的一件事是用户的计算机在上述注册表项下没有值 PreferredClr。它只包含一个名为 compatibleFrameworks 的值,其中包含数据:
<compatibleFrameworks xmlns=\"urn:schemas-microsoft-com:clickonce.v2\">
<framework targetVersion=\"4.5.2\" profile=\"Full\" supportedRuntime=\"4.0.30319\" />
</compatibleFrameworks>
如有任何帮助,我们将不胜感激。谢谢!
P.S:所有机器都在使用Windows 7.
重新安装 Microsoft Visual Studio 2010 Tools for Office Runtime (x64) 解决了问题。