Click here to Skip to main content
15,885,914 members
Articles / Programming Languages / C#

Write Extensions for the Visual Studio 2010 Editor

Rate me:
Please Sign up or sign in to vote.
2.00/5 (3 votes)
2 Dec 2009CPOL4 min read 36.1K   923   13   4
How to extend the Visual Studio editor to make editing code more pleasant and productive
Editor Extensions

Introduction

This article is part of my series on Visual Studio Extensions. Before you read it, please read the Introduction. It tells you the purpose of the series and gives you some tips on presenting my material. This article is designed to give you what you need to deliver a successful presentation. The speaker notes and demo script, along with the videos, are part of the package and you won't learn everything from just the text of the article. My goal is to increase developer awareness of Visual Studio Extensions by making it easy for anyone to deliver a presentation on them at a user group, code camp or the like.

Visual Studio 2010 has a whole new code editor and that opens a whole new set of doors for those who like to customize and make the tool their own. The new WPF-based editor can use a variety of fonts, backgrounds, images and gradients in the code area and both horizontal and vertical margins. This presentation shows a few editor extensions to inspire attendees, and walks through creating one extension. It also discuss the VSIX format, the Visual Studio Gallery, and how simple it is to share your extensions with the community.

Presenting this Session

This is a 300 level session for people who know what extensions are. Some of them will be using extensions, and they should be interested in learning how to write them. There is a small amount of material to get them to agree that extending the editor has plenty of benefits.

This session starts with background - what's different in the editor, what can you extend? Then comes some inspiration. You should probably play with the extensions that are mentioned in the deck. If you really want to demo them, check for time, because I timed this session without demo-ing the examples on Slide 6, and the other two are not very simple to demo. Besides, you really don't want any extensions installed when you're doing the real demos. But just because you're not going to demo them, you should still install them, play with them, know how they can change the way Visual Studio feels to you as a developer. Then uninstall them before you deliver the session.

I've recorded the individual demos so you can see how they're done and about how long they take. Once you know how to do these demos, you'll find the slides very easy to talk to since many of them summarize the points you made in the demo.

Demo 1 - Writing the Extension

I included Slide 10 and my talking to it before the demo, because I think explaining the architecture goes hand in hand with writing the code. It's about 20 minutes long. I have had to split it into two parts in order to upload it.

Demo 2 - Sharing the Extension

This demo has several small parts and you need to have the overview so you understand why you are popping over to something and then coming back to where you were. First you change the manifest, then show how there are now two extensions in the experimental instance and delete the old one. Then you browse to where the experimental instance looks for extensions to connect to the slide on that. While still outside of Visual Studio, you browse to the VSIX file for the demo extension, and show how it's just a zip. Then it's off to the Visual Studio Gallery both in a browser and from Extension Manager. You show the start of how to upload a vsix, and how to find the Visual Studio SDK. Finally you share your extension with yourself by copying the VSIX to your desktop and installing it. Luckily that's incredibly simple and quick. The whole demo runs about 14 minutes so there's a context switch every minute or two. Make sure you practice this one a lot so you don't get lost and skip a section. I have had to split it into two parts in order to upload it.

The Notes

Remember, you don't have to learn these just from the videos. There are detailed speaker notes and a demo script for you in the downloads for this article.

History

  • 1st December, 2009: Initial version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 2 Pin
f r i s c h3-Dec-09 22:34
f r i s c h3-Dec-09 22:34 
GeneralMy vote of 1 Pin
Priyank Bolia3-Dec-09 20:08
Priyank Bolia3-Dec-09 20:08 
GeneralRe: My vote of 1 Pin
f r i s c h3-Dec-09 22:34
f r i s c h3-Dec-09 22:34 
Generalusername password needed for the videos Pin
Jochen Baier2-Dec-09 22:25
Jochen Baier2-Dec-09 22:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.