views:

23

answers:

2

Hi people. I know this has been asked before, but I've never found a solution to this. I created an Addin in Visual Studio for Outlook 2007. I created an Installer and copied the files and created the registry values. It installs perfectly on the developer computer and it uninstalls perfectly as well. But on the second computer, which is also Windows 7 32bit and Office 2007, the registry key LoadBehavior is always reset to 2 when Outlook opens. I edit it to say 3 and it just resets to 2 again. No error message or anything. This also happened on my computer at work.

Now, I did read something about this guy that tried installing Visual Studio on the computer and it would run just fine after. Made me think I need some other .NET library or something? Why does this happen and has anyone ever found a solution?

A: 

In my case this turned out to be caused by an issue in a license protection wrapper from a third-party vendor. The issue has apparently been fixed in more recent versions of that product (contact me in private if you need more details).

Also, watch out for message boxes shown during Outlook startup. Outlook is really sensitive to those and AFAICT it has only gotten worse with Outlook 2010, especially under Windows 7.

Also, see this question of mine for links to a MS blog entry about this.

Oliver Giesen
A license protection wrapper from a third-party vendor? Hmm, I don't think anything is installed on this computer besides this add-in. Atleast not for Outlook. It's a vmware computer btw, and it's running Windows 7 and has the latest updates. I don't see any message boxes either though. And nothing appears to be logged in the Event Viewer either. It's really bizarre. And also it didn't work on my computer at work. But that is full of crap that might have something to do with it. But the error ratio is still pretty bad.
Kenny Bones
Well OK, the other thing to really look out for is unhandled exceptions. Ideally, not a single exception should bubble up to Outlook. In other words: `try...catch` everything! Especially any code that gets called directly by Outlook (e.g. `OnConnection`, `StartupComplete`, etc.)!
Oliver Giesen
A: 

This link might help you in trouble shooting.

Kapilg
Ok, this only works via Visual Studio? Meaning, I have no use for this when running the add-in on a second computer?
Kenny Bones
you don't need visual studio for that. You can set the Environment variable VSTO_LOGALERT as mentioned in the article on the target machine and when you start Outlook, it creates a log file in the directory where you installed the add-in and will log all the details why the add-in is not loading.
Kapilg