.NET Tips and Tricks

Blog archive

Debugging and Deploying Office Add-Ins with Add-In Express

I'm obviously impressed with Add-In Express, reviewed in the September issue of Visual Studio Magazine (Build Office Apps with Add-in Express). I've built a lot of Office-based applications and it's never been fun or pretty. Using Visual Studio Tools for Office didn't make the process any easier -- it substantially increased the amount of required plumbing code that you had to write to make anything work. Add-In Express takes care of all the ugly plumbing so that you can work on the custom code that your Add-In requires.

Even debugging is made easier with Add-In Express. You can press F5 to debug your application by specifying the path to the executable for one of the Office applications in the project's Debug Options. Compiling your Add-In registers it in Windows on the local computer so that, when you start an Office application, your Add-In will be available. You can also unregister a component (essential if your Add-In isn't working right and you want to actually, you know, use Office) by right mouse clicking on the project in Solution Explorer and picking Unregister ADX Project.

But that brings up another issue: installing your solution on some other computer. With Add-In Express, the first step is to right-mouse click on the project in Solution Explorer and select Create Setup Project. A Wizard pops up to let you select some options for your setup project. When the Wizard is done, you have a complete setup project for your Office Add-In. After building the setup project you have an MSI file (and a setup.exe for old times' sake) that you can take to another computer to install your add-in.

I built my application in Visual Studio 2010 with .NET 4 so I also had to install .NET 4 on my target computer. But other than that wrinkle, everything worked the first time.

I didn't test the feature but, in theory, you can even publish your Add-In so that it will download and install itself over the Internet using ClickOnce. That's very cool.

Posted by Peter Vogel on 09/19/2010 at 1:16 PM


comments powered by Disqus
Most   Popular
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.