Installed COM Shim Add-in Wizard - Can't Debug Projects Now

J

Jon Ebersole

After reading all the newsgroups and Microsoft articles on why I should Shim
my Outlook Add-in, I decided to download the latest Shim Add-In Wizard and
give it a shot. Well, even though my add-in works when I start Outlook, it
crashes if I try to debug it (happens with all other office add-ins now too).

I created a new Shim Add-In project and selected my existing Add-In project,
using its original GUID. I compiled the new shim, then added it to my
existing project, and recompiled it. Then I added its primary output to my
installation folder for the installer. I compiled the installer and ran it.
I then started Outlook and my command bars loaded. Great!... no, not
really...

I tried to debug my application and it crashes Outlook everytime. And then
I get an error everytime i start Outlook about disabling my add-in. I keep
saying no so my add-in stays loaded.

I think this has to do with strong naming. All of my assemblies are strong
named. I saw some posts on this, so I added the line /keyfile:xxxx to my
command line property in the Linker section of the Shim's project properties.
It still crashes. No warnings, no messages, nothing.

Does anyone know where this problem is occuring in the shim and how I get
back to normal for debugging my add-in? I have even tried creating new
add-in projects with and without shims to see if it was my project
explicitly. Nope, none of them can be debugged.
 
J

Jon Ebersole

I first tried by installing Visual Studio 2005, but that kept crashing. It
was definitely time to rebuild my machine, so I took this opportunity to do
so. I rebuilt my machine, installed VS 2005 and Visual Studio Tools for
Office (VSTO) for 2005, and created an Outlook Add-In, which works like a
charm. No crappy shims to worry about anymore.

I realize this won't solve your issue with VS 2003 directly, sorry. But I
will say that if you have access to VS 2005, it is worth using it over 2003.
You will save a LOT of time and not have to worry about shimming or anything
else.

Sorry, but I never found out how to fix the shim problem in VS 2003. :-(
--
Jon Ebersole
Microsoft Certified Solution Developer


donald said:
Hi there,

Did you over come this problem if so how?

Jonathan Dorling
 
D

donald

i don't have access to VS 2005.

Also how did you work out what the error was with strong naming because
when i try and debug it closes with no error??

Jonathan Dorling
 
J

Jon Ebersole

Good Morning Donald...

I actually read about the 'strong naming' issues in another post in the
newsgroup. It made sense, because all of my libraries are strong named and I
only started getting the problems after adding my libraries to the shim.

I even tried creating brand new projects without strong names and I still
got the same crashing. I really think it has to do with the shim software in
general. I'm willing to bet if you re-install Windows XP and re-install the
shim software you will probably have better luck. I know that after a year
of work, my system often needs to be rebuilt to start fresh. I found that my
system got so messed up a few weeks ago that I had to login as a different
user to install software. My profile became corrupt. Have you tried...

-Logging in as a different user
-Create a new shim application for Outlook with no real code
-Create a break point in the first available method

This will let you know if it is your profile or your machine, which is
basically the VS Environment playing with your Office install. Maybe even
uninstalling Office, delete all reg keys and folders, then re-install office?

When I do really risky development, I often create a restore point in XP so
I can go back to normal. Have you tried a restore point from prior to your
shim installation?
 
D

donald

hi jon,

thanks for your quick reply. Do say in your last paragraph that you
install shim software which i have not.

i have just move the code from a my desktop to my new laptop. which i
have only got VS.net and office 2003 and my os on there is windows XP.
It works fine on the old pc i just need to change the office and
outlook references

Thanks for any clues.

Donald
 

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