Outlook won't load my Addin (VS2005 C#)

J

Joseph Geretz

I've been working on an Addin for Outlook in C#. It hasn't been long now,
just a couple of days.

Suddenly though, running my project in Debug launches Outlook as specified,
but no breakpoints are hit in my source code. The Addin isn't being loaded.

If I create a new Addin program from scratch, e.g. AddIn1, it loads up fine
from Outlook. I archived my existing code, cleared out the registry and
recreated a brand new Addin project with the same name. The internal code is
exactly the same as Addin1, which loads fine, but my named Addin doesn;t
load up.

Sure, I could abandon the name I'm using, but I like the name, I'm working
on a product and I'd like to keep the name if I can. I don't want to have to
change my product name, just because my Outlook doesn't want to load it!

What can I do to diagnose this?

Thanks for your help!

- Joseph Geretz -
 
K

Ken Slovak - [MVP - Outlook]

Is Outlook showing that addin as disabled? Check in Help, About, Disabled
Items. If so there was some crash or unhandled exception and your addin was
disabled by Outlook.
 
T

Thaddaeus Parker

Your project output and your debug symbols are not synching correctly, to
begin with. If you attempted to install the addin with VS2005 and then made
significant changes to the code base you will most definitely have problems.

One of a few steps you can do is go to the Project Properties and redirect
your project output to the location of your installed addin. That way you
can make changes and still be able to step through the code. This is done by
right-clicking the Addin project choosing Properties, then selecting the
Build tab, under the Output delimter browse to where you have previously
installed the code.

If you really want to reuse the first name of your addin you are going to
have to do a registry clean of the GUID that you used for your original
addin. Even if you uninstalled and thought you got all the entries, you may
not have.

Sometimes though it might be worth shutting down VS2005, rebooting your
system and starting where you left off.

Regards,

Thaddaeus.
 
J

Joseph Geretz

Hi Thaddaeus,
Your project output and your debug symbols are not synching correctly, to
begin with. If you attempted to install the addin with VS2005 and then
made significant changes to the code base you will most definitely have
problems.

But aside from not hitting my breakpoints, I don't even see the Add In
appearing in Outlook. If my AddIn loads, it installs several toobar buttons
and menu items, but these are not appearing.
One of a few steps you can do is go to the Project Properties and redirect
your project output to the location of your installed addin.

I'm not sure what you mean by this. I never actually installed the AddIn.
I've just been running this from within Visual Studio. Eventually I'll need
to work on a deployment, but for now it seems that VS has been taking care
of 'behind the scenes' installation.
If you really want to reuse the first name of your addin you are going to
have to do a registry clean of the GUID that you used for your original
addin. Even if you uninstalled and thought you got all the entries, you
may not have.

I will give this a shot.

Thanks!

- Joe Geretz -
 
R

Rog

Having built add-ins in VS2003 using C# I have run into issues where my
add-in did this same exact thing and it came down to my add-in after it
was rebuilt not registering itself.
At one point I used a COM Shim in order to load my add-in, but this
solution does not work on .net 2.0. So I went back to using regasm which
is what VS uses anyway. One thing I would definately check is that your
add-in is being registered after it has been compiled.
Rog
 
K

Ken Slovak - [MVP - Outlook]

What if you set a breakpoint in your addin and right-click on the breakpoint
and select the Location menu item. In that dialog check the "allow source
code to be different from the original version" checkbox. Does that help at
all?
 
J

Joseph Geretz

Hi Rog,
One thing I would definately check is that your add-in is being registered
after it has been compiled.

How do I check this? Under Project | Properties | Build Tab, Register for
COM interop is checked. What can I do further to confirm that this is
actually being properly registered?

Thanks!

- Joe Geretz -
 

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