Skip to main content

Command Palette

Search for a command to run...

Working with COM add-ins in VS Code

Published
1 min read
Working with COM add-ins in VS Code
B

Expert generalist • Independent Contractor • Microsoft MVP • Home Assistant enthusiast Hi there! I'm Bogdan Bujdea, a software developer from Romania. I'm currently a .NET independent contractor, and in my free time I get involved in the local .NET community or I'm co-organizing the @dotnetdays conference. I consider myself an expert generalist, mostly because I enjoy trying out new stuff whenever I get the chance and I get bored pretty easily, so on this blog you'll see me posting content from programming tutorials to playing with my smart gadgets.

This morning I was talking with some colleagues about how I'm working on a boring COM add-in for Outlook and I can't use VS Code for that. But then I realized that it was just an assumption because I never actually tried to do it. So after a quick google search I found a cool msbuild plugin for VS Code called msbuild-tools

After I installed it, the next step was to create a .vscode folder in my solution folder and then a msbuild-tools.json file which contains the settings for building the plugin and starting Outlook.
Inside the file, you should put this content with your solution name and Outlook path.

After you have this file, just open the command palette and search for "msbuild-tools: Build", then hit Enter. Your solution should start building and if you want to run it just use "msbuild-tools: Run Without Debugging".

There are two problems though(that I'm aware of)...you can't debug it and I couldn't find a XAML designer for VS Code. Still, I'm satisfied with being able to build and run the project and when I'll need to debug it or work on the UI I'll just switch to Visual Studio.

Working with COM add-ins in VS Code