Outlook 2010加载项无法使用HRESULT的错误异常:0x8004063e

编程入门 行业动态 更新时间:2024-10-26 14:28:16
本文介绍了Outlook 2010加载项无法使用HRESULT的错误异常:0x8004063e的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们有一个Outlook 2010加载项,在使用.NET Framework 4.0之前一直运行良好。在.NET框架升级到4.5.2之后,它停止在少数用户的计算机上加载(问题不是每个人都在发生,在我的机器上运行正常)。在阅读了几篇博客后,我将值0分配给用户计算机中的环境变量 VSTO_SUPPRESSDISPLAYALERTS ,并在Outlook打开并尝试加载我们的加载项时出现以下错误:

例外来自 HRESULT:0x8004063E *** ***********异常文本************** System.Runtime.InteropServices.COMException(0x8004063E):异常来自 HRESULT:0x8004063E 在System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal( Int32 errorCode, IntPtr errorInfo)在System.Runtime.InteropServices.Marshal.ThrowExceptionForHR( Int32 errorCode, IntPtr errorInfo) at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(字符串 solutionLocation,字符串 manifestName,字符串 documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, Boolean useFastPath,IntPtr&执行者) 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 \ 个人资料 = \\ \\ Full \ supportedRuntime = \ 4.0.30319 \ / > < / compatibleFrameworks >

任何帮助将不胜感激。谢谢! PS:所有机器都使用Windows 7. 我试过的: 尝试删除注册表项 HKEY_CURRENT_USER \Software\Microsoft\VSTO \ SolutionMetadata 并重新安装加载项但不起作用。

解决方案

重新安装用于Office运行时的Microsoft Visual Studio 2010工具(x64)解决了问题

We have an Outlook 2010 add-in which worked fine till it was using .NET Framework 4.0. After the .NET framework was upgraded to 4.5.2, it stopped loading in a few users' machines (the issue is not occurring for everyone, works fine in my machine). After reading a few blogs, I assigned the value of 0 to environment variable VSTO_SUPPRESSDISPLAYALERTS in the user's machine and got the following error when Outlook is opened and it tries to load our add-in:

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)

Using .Net Framework 4.0 is not an option for us and we have to use 4.5.2. I have also tried deleting the registry key HKEY_CURRENT_USER\Software\Microsoft\VSTO\SolutionMetadata and re-installing the add-in but that did not work. However, one thing which I did notice was the user's machine did not have the value PreferredClr under the above registry key. It only contains a value called compatibleFrameworks which contains the data:

<compatibleFrameworks xmlns=\"urn:schemas-microsoft-com:clickonce.v2\"> <framework targetVersion=\"4.5.2\" profile=\"Full\" supportedRuntime=\"4.0.30319\" /> </compatibleFrameworks>

Any help will be appreciated. Thanks! P.S: All machines are using Windows 7. What I have tried: Tried deleting the registry key HKEY_CURRENT_USER\Software\Microsoft\VSTO\SolutionMetadata and re-installing the add-in but that did not work.

解决方案

Re-installing Microsoft Visual Studio 2010 Tools for Office Runtime (x64) resolved the issue.

更多推荐

Outlook 2010加载项无法使用HRESULT的错误异常:0x8004063e

本文发布于:2023-11-06 01:47:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1562408.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   异常   错误   Outlook   x8004063e

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!