PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Unable to get outlook com addin to install correctly

Reply

Unable to get outlook com addin to install correctly

 
Thread Tools Rate Thread
Old 14-03-2006, 06:55 AM   #1
michael.porfirio@people.net.au
Guest
 
Posts: n/a
Default Unable to get outlook com addin to install correctly


Hi,

I'm a very new to Visual Basic .Net and are having some issues with a
com add-in that I built. I'm using Visual Studio 2005 and have built a
simple com add-in that creates a command bar with a button. When this
button is clicked it launches a custom appointment form. When I build
the project from within Visual Studio, it builds with no errors and
when outlook is restarted the command bar appears and works exactly the
way I want it. Now, if I create an msi / setup.exe from within Visual
Studio from the project and then use it to install the button on the
same computer, the com add-in no longer appears. If you look under com
add-ins in outlook it's there, but it's unticked. If you try to tick
the box you get the following error: "Not loaded. A runtime error
occurred during the loading of the COM Add-in." I have also look
under Help/About/Disabled Items and there are no disabled items listed.
When you run setup.exe it puts all the files under
c:\ProgramFiles\request. I've checked the registry differences between
when I simply build the project and when I run setup.exe. The entries
look the same except for the manifest location when I run setup because
it now points to the new location. Can anyone help me? I need to get
this button deployed across my company asap and I've gotten to the end
of my limited knowledge of com add-in programming.

  Reply With Quote
Old 14-03-2006, 03:49 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Unable to get outlook com addin to install correctly

Did you set up security for your addin on the client machine as part of your
deployment?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


<michael.porfirio@people.net.au> wrote in message
news:1142314180.716077.4500@e56g2000cwe.googlegroups.com...
> Hi,
>
> I'm a very new to Visual Basic .Net and are having some issues with a
> com add-in that I built. I'm using Visual Studio 2005 and have built a
> simple com add-in that creates a command bar with a button. When this
> button is clicked it launches a custom appointment form. When I build
> the project from within Visual Studio, it builds with no errors and
> when outlook is restarted the command bar appears and works exactly the
> way I want it. Now, if I create an msi / setup.exe from within Visual
> Studio from the project and then use it to install the button on the
> same computer, the com add-in no longer appears. If you look under com
> add-ins in outlook it's there, but it's unticked. If you try to tick
> the box you get the following error: "Not loaded. A runtime error
> occurred during the loading of the COM Add-in." I have also look
> under Help/About/Disabled Items and there are no disabled items listed.
> When you run setup.exe it puts all the files under
> c:\ProgramFiles\request. I've checked the registry differences between
> when I simply build the project and when I run setup.exe. The entries
> look the same except for the manifest location when I run setup because
> it now points to the new location. Can anyone help me? I need to get
> this button deployed across my company asap and I've gotten to the end
> of my limited knowledge of com add-in programming.
>


  Reply With Quote
Old 15-03-2006, 06:01 PM   #3
Dave Kane [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Unable to get outlook com addin to install correctly

It sounds like the issue is .NET Code Access Security. I'm guessing that you
built using Visual Studio Tools for Office (VSTO), which automatically
grants access to your assembly when you build it (using the full path), so
it runs/debugs with no problem from the build location. But your install
puts the assembly in a different location and the previously granted trust
no longer applies. If this is the case then you need to modify your setup
project to grant full trust to the installed assembly.

This article http://msdn2.microsoft.com/en-us/library/s66ay8f7(VS.80).aspx
discusses one method of doing that. Look for "Code Access Security Policy"

Sue Mosher page on VSTO (http://www.outlookcode.com/vsto/index.htm) has a
list of articles on deployment. The two by Mads Nissen cover a different way
to have the MSI run an action that grants trust to your assembly.



<michael.porfirio@people.net.au> wrote in message
news:1142314180.716077.4500@e56g2000cwe.googlegroups.com...
> Hi,
>
> I'm a very new to Visual Basic .Net and are having some issues with a
> com add-in that I built. I'm using Visual Studio 2005 and have built a
> simple com add-in that creates a command bar with a button. When this
> button is clicked it launches a custom appointment form. When I build
> the project from within Visual Studio, it builds with no errors and
> when outlook is restarted the command bar appears and works exactly the
> way I want it. Now, if I create an msi / setup.exe from within Visual
> Studio from the project and then use it to install the button on the
> same computer, the com add-in no longer appears. If you look under com
> add-ins in outlook it's there, but it's unticked. If you try to tick
> the box you get the following error: "Not loaded. A runtime error
> occurred during the loading of the COM Add-in." I have also look
> under Help/About/Disabled Items and there are no disabled items listed.
> When you run setup.exe it puts all the files under
> c:\ProgramFiles\request. I've checked the registry differences between
> when I simply build the project and when I run setup.exe. The entries
> look the same except for the manifest location when I run setup because
> it now points to the new location. Can anyone help me? I need to get
> this button deployed across my company asap and I've gotten to the end
> of my limited knowledge of com add-in programming.
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off