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

  • Thread starter Carlos Valdivia
  • Start date
C

Carlos Valdivia

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
 
J

Jason

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.
 
C

Carlos Valdivia

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.
 

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