.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


comments powered by Disqus

Featured

  • OpenSilver 3.1 Unveils Drag-and-Drop XAML Designer for VS Code

    Claiming an industry first, Userware announced a drag-and-drop XAML designer for use in VS Code, coming with OpenSilver 3.1, the latest iteration of the open-source implementation of Microsoft's long-deprecated and oft-mourned rich client development platform, Silverlight.

  • Visual Studio Dev Vexed by Copilot's Obtuse 'Responsible AI' Refusal

    No matter what, some systems simply won't divulge exactly what in the current conversation caused them to balk, simply pointing to vague policies and generic guidance.

  • Build Your First AI Applications with Local AI

    "AI right now feels like a vast space which can be hard to jump into," says Craig Loewen, a senior product manager at Microsoft who is helping devs unsure about making that first daunting leap.

  • On Blazor Component Reusability - From Day 0

    "We want to try to design from Day One, even Day Zero, with reusability in mind," says Blazor expert Allen Conway in imparting his expertise to an audience of hundreds in an online tech event on Tuesday.

  • Decision Tree Regression from Scratch Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of decision tree regression using the C# language. Unlike most implementations, this one does not use recursion or pointers, which makes the code easy to understand and modify.

Subscribe on YouTube