Saturday, February 12, 2011

Creating Visual Studio toolbar commands to execute batch files

I have a few batch files I need to run frequently in developing a certain project. I'd like to create a Visual Studio toolbar called "MyProject" and have commands underneath to execute these batch files. What is the easiest way to accomplish this?

  • In the Tools... menu, select External Tools... and add references to the batch files. Then right-click on a toolbar, select Customize..., go to the Toolbars tab, click on New..., name your new toolbar, click on OK, go to the Commands tab, select the Tools category and drag-drop the appropriate External Command Command onto your custom tool bar.

    If you need to run batch files that always run right before or after a build, you're probably better off making use of build events.

0 comments:

Post a Comment