VSTO 2005 - Outlook Addin - Not Loaded. A runtime error occured du

  • Thread starter VSTO Not Loaded. A runtime error occured
  • Start date
V

VSTO Not Loaded. A runtime error occured

I am developing one add-in for outlook in VSTO 2005. I have completed my
development and deployed in a test machine.
But i am geting the error " Not Loaded. A runtime error occured during the
loading of the COM Add-in" while loading the outlook add-in, which is not
happening in my developement environment.

I went to few forums and find some ideas. But nothing is helping me. To find
outthe error i have
set VSTO_SUPPRESSDISPLAYALERTS=0
in command window and run the outlook from command window.
I got the following error.


Could not load file or assembly 'integra, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=467162d853420c88' or one of its dependencies. Failed to grant
permission to execute. (Exception from HRESULT: 0x80131418)

************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly 'integra,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=467162d853420c88' or one of
its dependencies. Failed to grant permission to execute. (Exception from
HRESULT: 0x80131418)
File name: 'integra, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=467162d853420c88' ---> System.Security.Policy.PolicyException:
Execution permission cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainM
anagerInternal.HandleOnlineOffline(Exception e, String basePath, String
filePath)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainM
anagerInternal.LoadStartupAssembly(EntryPoint entryPoint, Dependency
dependency, Dictionary`2 assembliesHash)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainM
anagerInternal.ConfigureAppDomain()
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainM
anagerInternal.LoadAssembliesAndConfigureAppDomain(IHostServ iceProvider
serviceProvider)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainM
anagerInternal.LoadEntryPointsHelper(IHostServiceProvider serviceProvider)




************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorl ib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.
Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microso
ft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c5
61934e089/System.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77
a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.Office.Tools.Common
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.
Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Comm on.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.
0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0_
_b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

Based on that i have searched on the net and got some clues which didn't
help me at all.

I have given the trust to assembly. Bad luck i didn't get the result.

I have given trus with the below commands

caspol -m -af <assembly path>
caspol -m -chggroup LocalIntranet_Zone FullTrust

Please kindly help me to get a solution for this issue.

Thank you,
With Regards,
Sankararam
Singapore
 
K

Ken Slovak - [MVP - Outlook]

What is "integra"? Is it your addin?

Is integra strong named? Have you looked at the deployment guide for VSTO?
Usually full trust is granted to the VSTO addin based on strong naming using
a code signing certificate and full trust is granted based on that strong
naming.

Take a look at the deployment guide for VSTO at
http://msdn.microsoft.com/en-us/library/bb332051.aspx and see if following
all the steps there for trusting your addin helps.




"VSTO Not Loaded. A runtime error occured" <VSTO Not Loaded. A runtime error
(e-mail address removed)> wrote in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top