It's often useful to be able to run files in a solution from within Visual Studio. I use this to do things such as run batch files to build or deploy the solution. I can't claim to have invented this method which I found many years ago on a website I no longer recall, but I thought I'd pass it on due to its utility when working with build scripts.

To set it up, add an external tool (Tools -> External Tools). Set it up as shown below.

image

You'll now have an entry on the Tools menu called Run Script that will run whatever you have selected in the Solution Explorer. To be extra fancy you can add it to a toolbar or assign a keyboard shortcut.

To add it to a toolbar right click on the toolbar area and select the Customise option. The dialogue shown below appears. Find the External Commands in the Tools list as shown. The command name you assign is not shown so you'll have to count which number it is. In my case it's my only entry which makes the counting relatively simple. Now just drag the relevant External Command onto the toolbar you wish it to appear in. When you close the dialogue the entry will switch to the name you've selected.

image

To assign keyboard shortcut use the options dialogue (Tools -> Options). I describe this in more detail here.

image