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.