Managed Com Add in Disabled automatically

C

cramhead

Hi I'm hoping one of you brilliant people can help me out.

I've made a com add in VB.NET in VS.NET 2005.
It runs fine on my development machine, but is immediately disabled
when installed on other machines with Outlook 2003.
There are no warnings or event log messages regarding the disabling of
the addin.
Nothing is visible in the Help > About > Disabled Items listing.
Nothing is visible in the Tools > Options > Other > Advanced Options >
COM Add-Ins listing.
If I attempt to add and point to the COM shim it does not complain,
but doesn't make an entry. If I point to the actual add in dll it says
that it is not a valid add in.

The "LoadBehavior" specified in the registry entry is changed from 3,
i.e. load of start up of Outlook, to 2, disabled when Outlook starts.
I've used Com Shim Wizard for VS.NET 2005 and it seems to work fine.
In my deployment project I include the Primary Output from the addin
project as well as the Com Shim project (I don't know if this is
exactly what I should be doing or not)
In my references I reference
C:\Program Files\Common Files\Microsoft Shared\MSEnv\PublicAssemblies
\Extensibility.dll, C:\WINDOWS\assembly\GAC\Office
\12.0.0.0__71e9bce111e9429c\Office.dll, C:\WINDOWS\assembly\GAC
\Microsoft.Office.Interop.Outlook\11.0.0.0__71e9bce111e9429c
\Microsoft.Office.Interop.Outlook.dll,
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll,
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll

Is there a reference that I'm missing?

I'm assuming that the Microsoft.Office.Interop.Outlook.dll reference
setup project is the primary interop assembly for being able to work
with unmanaged objects in the managed environment. It's register entry
is set to "vsdraDoNotRegister'. I don't really know if that is
correct, but it's the default so I'm assuming so.

I've also tried registering the COM shim with regsvr32.exe. It
registers but seems to change nothing.

I have administrative rights on the machine I'm installing on so I
don't think it's permissions.

Thanks in advance
Marc
 
P

pavan

Hi I'm hoping one of you brilliant people can help me out.

I've made a com add in VB.NET in VS.NET 2005.
It runs fine on my development machine, but is immediately disabled
when installed on other machines with Outlook 2003.
There are no warnings or event log messages regarding the disabling of
the addin.
Nothing is visible in the Help > About > Disabled Items listing.
Nothing is visible in the Tools > Options > Other > Advanced Options >
COM Add-Ins listing.
If I attempt to add and point to the COM shim it does not complain,
but doesn't make an entry. If I point to the actual add in dll it says
that it is not a valid add in.

The "LoadBehavior" specified in the registry entry is changed from 3,
i.e. load of start up of Outlook, to 2, disabled when Outlook starts.
I've used Com Shim Wizard for VS.NET 2005 and it seems to work fine.
In my deployment project I include the Primary Output from the addin
project as well as the Com Shim project (I don't know if this is
exactly what I should be doing or not)
In my references I reference
C:\Program Files\Common Files\Microsoft Shared\MSEnv\PublicAssemblies
\Extensibility.dll, C:\WINDOWS\assembly\GAC\Office
\12.0.0.0__71e9bce111e9429c\Office.dll, C:\WINDOWS\assembly\GAC
\Microsoft.Office.Interop.Outlook\11.0.0.0__71e9bce111e9429c
\Microsoft.Office.Interop.Outlook.dll,
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll,
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll

Is there a reference that I'm missing?

I'm assuming that the Microsoft.Office.Interop.Outlook.dll reference
setup project is the primary interop assembly for being able to work
with unmanaged objects in the managed environment. It's register entry
is set to "vsdraDoNotRegister'. I don't really know if that is
correct, but it's the default so I'm assuming so.

I've also tried registering the COM shim with regsvr32.exe. It
registers but seems to change nothing.

I have administrative rights on the machine I'm installing on so I
don't think it's permissions.

Thanks in advance
Marc

Couple of things first:
1. Make sure all the dlls that you are referencing in your project
like extensibility.dll are present on the deployment m/c.
2. Make sure you apply all the updates required like KB907417

If your loadbehavior is changing to 2, taht clearly means that your
code is resulting in an app crash and thus the host app is disabling
it. You need to find the reason behind it, in your code or otherwise
(like missing updates).

Let us know if this helps you.

Regards,
Pavan
 
C

cramhead

Couple of things first:
1. Make sure all the dlls that you are referencing in your project
like extensibility.dll are present on the deployment m/c.
2. Make sure you apply all the updates required like KB907417

If your loadbehavior is changing to 2, taht clearly means that your
code is resulting in an app crash and thus the host app is disabling
it. You need to find the reason behind it, in your code or otherwise
(like missing updates).

Let us know if this helps you.

Regards,
Pavan

Thanks Pavan, I really appreciate your input.

I've added all the assemblies referenced with in the project to setup
project as is visible at the following url
http://picasaweb.google.com/cramhea...photo?authkey=2T8AQ9mZq6c#5033722293679770194.

It works now for a project with just a msgBox in a try catch block,
next I'll try it with my code in there.

Marc
 
K

Ken Slovak - [MVP - Outlook]

Just make sure you're not deploying dll's you aren't supposed to, or PIA's.
The Office PIA's and the Framework should always be installed from the MS
Web site for example, or from an Office CD.
 
C

cramhead

Thanks for your post Ken.

Yes, I'm a little concerned about that.
Is the including the C:\WINDOWS\assembly\GAC
\Microsoft.Office.Interop.Outlook\11.0.0.0__71e9bce111e9429c in the
deployment package deploying something that I should not be?

I'm assuming that if this is the case Outlook add in would work fine
even though the PIAs had not been installed from the web site or
Office CD, but if someone removed my add in all other add ins would
fail also?

Thanks
Marc

Just make sure you're not deploying dll's you aren't supposed to, or PIA's.
The Office PIA's and the Framework should always be installed from the MS
Web site for example, or from an Office CD.

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


On Feb 20, 2:30 am, "pavan" <[email protected]> wrote:
Thanks Pavan, I really appreciate your input.
I've added all the assemblies referenced with in the project to setup
project as is visible at the following url
http://picasaweb.google.com/cramhead/COMAddInReferences/photo?authkey....
It works now for a project with just a msgBox in a try catch block,
next I'll try it with my code in there.
 

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