Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mysterious issue with shared COM add-in deployment...

0 views
Skip to first unread message

Carlos Valdivia

unread,
Jul 6, 2006, 11:20:02 AM7/6/06
to
I posted this issue in some otehr forums and was pointed here. Hopefully
whats happening will be apparent to someone.

First, my project. I am trying to learn how to build COM add-ins from
development to deployment. I used Visual Studio 2005 (pro) to build a shared
add-in project (C#) for excel. My code consists of MessageBoxes inserted into
the boiler plate constructor (Connect) and methods (OnConnection.. etc.).

When I compile and run the setup, the add-in loads at startup and works as
expected (a series of message boxes popup telling me where the Addin is in
terms of execution). When I try to run the setup and run the addin on a
computer without Visual Studio 2005, it doesn't load. When I check the COM
Add-in dialog I see a message "Not Loaded, Runtime error occured during the
loading of the COM add-in". At the suggestion of some-one else I checked to
see whether there are any disabled items in Excel (there are none). I also
tried adding the .NET extensibility assembly ti the setup project by hand
(but not registering it). Again, no effect.

It has also been suggested that I try using a COM Shim add-in. I will
definitely look into that in the future, but I would really like to
understand what is happening in my simple case first.

Thanks for any help,
Carlos

Jason

unread,
Jul 6, 2006, 1:57:02 PM7/6/06
to
http://weblogs.asp.net/mnissen/archive/2005/07/01/417148.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms11122002.asp

I found this through googling for several hours. You have to set up the
add-in as fully trusted. This is not handled automatically by the installer.
However, with this handy dandy piece of code from the first article, you can
fix that!

Or you can do it manually.

Two odd things. First, the setup project ought to have this covered. What
the heck good is installing something if it won't run?

Second, the error message you get from Outlook is completely generic. There
is nothing in the event logs either. Come on, guys, get it together! How
about providing some clues to these kinds of failures in an obvious place!

The ease of writing an add-in is commendable. The difficulty of
distributing it is distressing.

Carlos Valdivia

unread,
Jul 6, 2006, 3:09:02 PM7/6/06
to
Thanks Jason, I'll give that code a try. I'm skeptical though. I would think
that if excel were having security difficulties then it would say so. Instead
I get a bland runtime error (as above).

Has anybody made an Excel (COM) Add-in in VS 2005 that can actually be
deployed to machines without VS 2005? All I want a real simple hello example
to work from, but I can't seem to get that anywhere.

As you said Jason, development is easy and deployment is strikingly
difficult. But that seems to be a theme with VS 2005. Just try to make a
simple distributable "hello world" console app in C++ without using an
installer or static linking. So frustrating.

tartancli

unread,
Jul 7, 2006, 4:40:02 AM7/7/06
to
Hi Carlos,

I had this problem when trying to deploy to machines having older versions
of Office installed (I was developing on a machine with 2003). If this is the
case for you then have a look at this article.

http://www.devcity.net/Articles/163/1/article.aspx.

Worked for me anyway - hope it will for you.

Carlos Valdivia

unread,
Jul 10, 2006, 11:19:02 AM7/10/06
to

Ok, following up. My simple add-in works (many thanks to Andrew
Whitechapel). For the simple add-in I needed to include some updates with my
distributable.

http://support.microsoft.com/kb/907417/

http://support.microsoft.com/kb/908002/en-us

0 new messages