none
VSTO Deployment Problem RRS feed

  • Question

  • Hi

    I have an addin for Outlook 2003 and i am having issues deploying the addin to other machines.

    I created Outlook 2003 project in VS 2008 on my dev machine that has Office 2003 installed.

    When I run the project within VS 2008 (debug) it opens Outlook 2003 and starts up the Add-in and works fine.

    When I attempt to install the add-in on a different machine everything goes smooth and it installs fine.

    However when you start Outlook the Add-in doesn't load. All I get is this error given below.

    "Load Behavior: A runtime error occurred during the loading of the COM Add-in" 

    I have Installed .NET framework 3.5 SP1, Office 2003 PIA, Visual Studio Tools for Office System 3.0 Runtime

    I see that the add-in has full trust. 

    I am using the setup project that gets created when you create a new Outlook 2003 add-in project to install the application. 

    Can someone tell me how to resolve this issue?

    Thanks

    V

    Wednesday, March 30, 2011 5:27 PM

Answers

  • Hi,

    You need to use caspol to grant full trust to your assembly after deploying.

    To grant full trust to your assembly, follow the following steps:

    1. Start Menu->All Programs->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt

    2. In the Command Line, type as follows:

    caspol -u -ag All_Code -url "C:\Test\XXAddIn.dll" FullTrust -n "Test"

    (You need to replace "C:\Test\XXAddIn.dll" with your assembly’s full path that the position of your Add-In be installed.)

    You can also look at the troubleshooting procedures at:

    http://blogs.msdn.com/vsod/archive/2008/04/22/Troubleshootin g-com-add-in-load-failures.aspx   

     

    Hope it can help you!


    SeeSeaIng
    Thursday, March 31, 2011 9:05 AM
  • Its working now.

    Assembly has full trust. Problem was that it did not have office2003PIA. I installed on the user pc and it worked.

    Thanks

    V

    Thursday, April 14, 2011 12:47 PM

All replies

  • Hi,

    You need to use caspol to grant full trust to your assembly after deploying.

    To grant full trust to your assembly, follow the following steps:

    1. Start Menu->All Programs->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt

    2. In the Command Line, type as follows:

    caspol -u -ag All_Code -url "C:\Test\XXAddIn.dll" FullTrust -n "Test"

    (You need to replace "C:\Test\XXAddIn.dll" with your assembly’s full path that the position of your Add-In be installed.)

    You can also look at the troubleshooting procedures at:

    http://blogs.msdn.com/vsod/archive/2008/04/22/Troubleshootin g-com-add-in-load-failures.aspx   

     

    Hope it can help you!


    SeeSeaIng
    Thursday, March 31, 2011 9:05 AM
  • Its working now.

    Assembly has full trust. Problem was that it did not have office2003PIA. I installed on the user pc and it worked.

    Thanks

    V

    Thursday, April 14, 2011 12:47 PM