.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


  • Purple Blue Nebula Graphic

    How to Compute Disorder for Machine Learning Decision Trees Using C#

    Using a decision tree classifier from a machine learning library is often awkward because it usually must be customized and library decision trees have many complex supporting functions, says resident data scientist Dr. James McCaffrey, so when he needs a decision tree classifier, he always creates one from scratch. Here's how.

  • Blazor's Future: gRPC Is Key

    Blazor guru Steve Sanderson detailed what Microsoft is thinking about the future of the revolutionary project that enables .NET-based web development using C# instead of JavaScript, explaining how gRPC is key, along with a new way of testing and a scheme for installable desktop apps.

  • Don't Do It All Yourself: Exploiting gRPC Well Known Types in .NET Core

    If you're creating business services that send dates and decimal data then you may be concerned that gRPC services don't support the relevant data types. Don't Panic! There are solutions. Here's how to use them.

  • Sign

    Microsoft Points Blazor to Native Mobile Apps

    Blazor, the red-hot Microsoft project that lets .NET developers use C# for web development instead of JavaScript, is now being pointed toward the mobile realm, targeting native iOS and Android apps.

  • Circl

    Implementing State in .NET Core gRPC Messages with oneof

    In the real world, you've been dealing with the State pattern every time you designed a set of database tables. The Protocol Buffers specification lets you do the same thing when you define the messages you send and receive from your gRPC Web Service.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events