Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:

C#
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:

XML
<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.
Posted
Updated 26-May-16 8:45am
Comments
an0ther1 25-May-16 22:06pm    
Hi Anish,
A quick google search on the error message returned a lot of results, some pointing to removing and re-installing VSTO, others to re-compiling the Add-In - perhaps updating the Target framework at the same time.
Have you tried either of the above?

Kind Regards
Anish_Chakraborty 26-May-16 14:44pm    
Hi,
Re-installing Microsoft Visual Studio 2010 Tools for Office Runtime (x64) resolved the issue. Thanks a lot!

1 solution

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900