Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Visual Studio contains a lot of tools for working with your code, but it's possible that it doesn't contain the tool that you want. After all, there are lots of companies out there creating developer tools. One of the easiest way to extend Visual Studio is by adding these third-party tools. I'm inside Visual Studio, and I have opened a solution called ExternalTools that contains two projects: one is a sample application we are going to add to the Tools menu, and another one is PixelSmithDesktop, which I am going to use for my disassembly demonstration.
The External tools live up here in the Tools menu. They are in this section of the menu. For example, here is an external tool, a very simple one called Create GUID. This was added by Microsoft. When I click on this link, it will launch an independent application. And then all this does is allow me to generate a unique identifier and then copy it to the Clipboard. For a more exciting demo, I am going to add one of my favorite third-party tools, which is called Reflector. This is a free tool that lets you disassemble your .NET code.
So I am going to go to Tools > External Tools, and then I am going to click the Add button. This is the title for the menu, so I am going to type in the word "Reflector". And then here, I choose the executable location. I click on this button. And the executable, I've made a copy of it on my desktop. Here it is, Reflector.exe. I've also created a copy of the executable from this solution file here OurExternalTool project, I've copied that over here because I am going to use it in a later demo.
So I'll click on Reflector.exe and then click on Open. On this line are the arguments that I want to pass from Visual Studio to the Reflector application. In my case, I want to pass this argument called Target Path. I am done, so I am going to click on OK. Now what's going to happen is I can select one of these two projects, and when I run Reflector it's going to define the executable for this application and open it up and disassemble the code, like this.
So there is PixelSmithDesktop. If I close this down and click on OurExternalTool and choose Reflector, I can see that it has added another executable. But this assembly tool is easy to use. I just click here, press the Spacebar, and it starts showing the disassembly information over here. Then I can drill down and find the class that I wanted to disassemble. And here's more information about it. I can look at the Visual Basic version of the code or disassemble it back into C#.
Your choice. As I said, this is one my favorite third-party tools. For my next demonstration, I thought I would show you one of our tools. So I have created this application, which has a simple Windows form on it. And when you click on this button, I'm going to load the command arguments into this list box. I am going to double-click on this button to look at the code. Now what I'm doing is when the form is loaded in the constructor, I'm grabbing an array of arguments. Those are being passed in from the static void main.
And then down here, I'm looking in the argument array, and I am looking for this delimiter, this semicolon. I am going to split the string based on that semicolon, and I am going to add an individual row to the list box based on that split string. So let me add this to the Tools menu. Click here. Go out to ExternalTools. Click the Add button again. Put my title in. I am going to find the executable.
Remember, on your machine you have to find the correct location for this executable. For convenience, I put it on my desktop. There it is. And then I am going to put some arguments in here, like the Item Path, and then that delimiter--the semicolon--and then some other argument like Target Path, semicolon, and I'll choose one more, Solution Directory, semicolon. I will click on OK, and then I am going to run the application.
And then I will click the Get Arguments. And you can see I have successfully passed three pieces of information from Visual Studio to my application. So let's review. You can easily add external applications to Visual Studio. If the third-party application supports command line parameters, you can pass information to them from Visual Studio. And that means you can customize the IDE even more to your liking.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 101431 Viewers
61 Video lessons · 88193 Viewers
71 Video lessons · 72061 Viewers
56 Video lessons · 103837 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.