Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Visual Studio has supported an extensibility model since day one. Unfortunately, creating an add-in for Visual Studio has been a task for geniuses. You had to understand the Visual Studio SDK, the COM model, and a complex deployment mode. Most of that changes with Visual Studio 2010. By using the Managed Extensibility Framework, or MEF, as a replacement for COM, Microsoft has made it super simple for us to build and deploy add-ins. In this movie, I will show you the Extension Manager, which is the first step in understanding extensions.
I am inside a solution called Extension Manager, which contains two projects: a Console application and our old friend PixelSmithDesktop. To work with Extension Manager, you go to the Tools menu and choose Extension Manager. On this tab, you can see any installed extensions in Visual Studio. I have two here because I've installed them in earlier movies: the DevExpress tools and the Snippet Designer. If I click on the Updates node, the tool will contact Microsoft web site to see if there are any updates for my installed extensions.
As you can see, there are none. Here is where it becomes really powerful. I can click on the Online Gallery. The tool will go out to the Microsoft designated web site and give me a list of all the available extensions. Currently, they're sorted by the highest rank extensions. Now if I decide that I want this Productivity Power Tools application, I can click on the Download button. I will do that in just a second. Let me show you a couple of these tools. Here's one called the VS10x Code Map.
As you can see, when you install this extension, it adds a special colorized navigation bar to the regular code window. That PowerCommands is another favorite of mine. This one gives you all sorts of useful commands, especially when you right-click items in this Solution Explorer. For example, here you can see I can open the containing folder or launch a command prompt directly from this app.xaml file. The one I'm going to install for today's demo is the Productivity Power Tools. All you need to do is click here and then click Download.
Next, I need to click the Install button, and it takes me over to the web site, so I can read more about that extension. I will have to restart Visual Studio here. Now, I can read about this extension. Let's look at a couple of features. There is the Solution Navigator, which gives you an alternate view to the Solution Explorer, and then another one that's a favorite of mine is the new Tab UI. Also, some people like this automatic C# completion of your brace structure.
So if you type in a beginning curly brace, it can type ending curly brace for you. I am going to close the browser, and then I am going to switch back to Visual Studio. Notice at the bottom of the screen it says you must restart Visual Studio, so I am going to choose Restart now. After a few seconds, Visual Studio restarts and reopens my solution. And now I can go to my Tools menu and go to Options.
And there's a new node in the Tools Option section. Here I can turn on the different extensions. Like if I want to have the Automatic Brace Completion, I can click here. And if I wanted to disable that, I can turn it off. Extensions are written using WPF. So this is using a WPF UI. Here is the Document Well Tab. This is where I can change the way the tabs look inside Visual Studio. You can see I can do things like tab sorting by project in alphabetical order and then choose OK.
Now, I am going to open up a few code files. I am going to open this Program.cs and make a change. Here is one of the additions. So there is now a red dot on that tab to signify that I have made a change to that file. I am going to go here to this MainWindow. xaml, and notice that the tabs are now colorized. This blue tab is for all the files that are inside the console demo. And I open multiple tabs here in the PixelSmithDesktop demo, you see they show this kind of brown theme and it's sorting them alphabetical by project.
I don't have enough files to show you that in great detail, but if you have 20 or 30 files opened it is really handy to see them in alphabetical order, when you're looking for that particular tab. I have to say I'm completely sold on this version of Visual Studio. This is the way extensibility should be, from the consumer's perspective. Extensions are easy to find, simple to install, and they automatically update if there's a newer version of the extension. They integrate easily with the Visual Studio IDE, too. The reason they integrate so well is because of the managed extensibility framework.
And that's the topic for the next movie in this chapter.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 102115 Viewers
61 Video lessons · 88841 Viewers
71 Video lessons · 72651 Viewers
56 Video lessons · 104289 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.