Reputation: 12316
I have created a .Net 4.0 (x86) Office 2007 (32-bit) Outlook plugin. Making the plugin was the easy part, making the installer is a bit more tedious.
After some research into VSTO and how to create MSI for it I (and a couple of other developers for verification) has followed both "Deploying a Visual Studio 2010 Tools for Office Solution Using Windows Installer", manually checked against "Deploying a VSTO 2010 solution for Office 2007/2010 using Windows Installer". I've also done some research such as testing "How do you assign the Assembly Location of an Excel VSTO Installation?" and more, I don't remember everything.
All required dependencies have been taken care of and manually double-clicking the .vsto-file installs it successfully and user is able to use it. (Looking at Process Monitor this seems to use SideBySide installation, can't find any use of the same registry keys as Microsoft instructions dictate.)
The MSI installation however still doesn't work. It installs fine and registers registry keys as expected, but plugin is not loaded at Outlook start.
The VSTO registry keys are correctly written according to documentation. The plugin seems to be registered in Outlook (Trust Center), and I can manually enable it there. However when restarting Outlook after manually activating it the LoadBehavior registry key changes from 3 (Loaded, Load at startup) to 0 (Unloaded, Do not load automatically). At no point is the plugin registered (it is supposed to register a toolbar+button).
How do I get the MSI working?
Why doesn't the guide work? (Changes in .Net 4.0? Not compatible with Office 2007? Just plain ol' wrong?)
How can I debug what is actually going wrong? I can't find anything useful in the Event log.
(PS! Manually installing is not an option. File must be automatically deployed to a large set of computers.)
Upvotes: 1
Views: 813
Reputation: 12316
I ended up creating a NSIS installer where I execute vstoinstaller with silent flag to install the VSTO. I also used a valid certificate to sign the binaries and (programatically) add the certificate to Trusted store during install phase before vstoinstall to bypass the -300 error code.
Upvotes: 0