Freigeben über


Creating VSPackages

Now that I've settled more into my new role as the documentation manager for the Microsoft Visual Studio SDK (which you can download through Visual Studio SDK Downloads (requires login)), my goal is to start going through the main how-to and walkthrough Help topics in the Visual Studio SDK. The first how-to I went through earlier this week is titled "How to: Create VSPackages (C#)." Which made me stop to think, "why would I want to go through all of the steps to create a VSPackage? Why not just create a macro or an add-in instead?" So I went and double-checked what I thought were my answers with some of the writers on the Visual Studio SDK documentation team. Here are the results of my chats with them.

You should use a macro when you need a quick, simple, temporary, or easily-distributable solution to automating Microsoft Visual Studio. For example, you could capture a series of keystrokes as a macro. Then you could run that macro later. You could even export that macro as a .vb file for another Visual Studio user's benefit.

You can use an add-in when you want to write code in a language other than Visual Basic. You could use an add-in when you want to go about protecting your code in a more robust way. You should choose an add-in when you want to make your code more easily discoverable in the Visual Studio integrated development environment (IDE). For example, you want to expose your keystroke macro as a Visual Studio toolbar button.

Use a VSPackage when you want to extend Visual Studio in ways that can't be done with macros and add-ins. Some examples would be integrating new programming languages into Visual Studio, creating custom code editors and solution designers, creating new solution project types, creating custom code debuggers, and exposing custom productivity tools through the Visual Studio IDE.

My goal next week is to go through the Visual Studio SDK's "Walkthrough: Creating a Tools Options Page" Help topic to learn how to create a custom Tools Options page. As I get more into these, hopefully I'll be able to share some more of my thoughts about them with you.

-- Paul

------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.

Comments

  • Anonymous
    February 06, 2006
    Dave Bost tells us Team Foundation Server Takes One Step Closer To Shipping.  Jeff Beehler also has some...