Skip to Content
Mastering Visual Studio .NET
book

Mastering Visual Studio .NET

by Chris Sells, Ian Griffiths, Jon Flanders
March 2003
Beginner
412 pages
12h 42m
English
O'Reilly Media, Inc.
Content preview from Mastering Visual Studio .NET

Chapter 8. Automation, Macros, and Add-ins

Once you have been working with VS.NET for a while, you will discover that you often perform certain tasks over and over. The particular tasks you need to perform will be very dependent on how you are using the IDE, what language and project types you deploy, and your own development style (or the development guidelines under which you are working). This chapter is all about how to get the IDE to automate these activities, by writing either macros or add-ins.

A macro is a snippet of VB.NET code that automates some operation in VS.NET. Macros provide a quick and easy way to automate tasks. They are straightforward to create, because VS.NET has built-in macro creation and editing features.

Macros are fairly powerful, but they have their limits, so VS.NET supports a more flexible if somewhat more complex integration interface for building add-ins. Add-ins are COM components, which means that they take more effort to create—you must compile and install add-ins before you can use them. (Macros can be written and executed on a whim—VS.NET compiles them automatically, and they do not need to be installed.) However, as well as having access to a more powerful API than macros, add-ins offer some further advantages—add-ins are easier to redistribute than macros are, and there is also no danger that anyone using your add-in might inadvertently break it when using VS.NET’s macro editor.

Tip

If you are writing functionality that you want to distribute ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mastering Visual Studio 2019

Mastering Visual Studio 2019

Joshua Garverick
ASP.NET Core 5 for Beginners

ASP.NET Core 5 for Beginners

Andreas Helland, Vincent Maverick Durano, Jeffrey Chilberto, Ed Price

Publisher Resources

ISBN: 0596003609Errata Page