Thursday, March 30, 2006

Command Prompt Here from Visual Studio

I use the explorer command prompt here capability all the time.

Today I was working in Visual Studio and thought wouldn't it be nice if you could just right click on a Solution Explorer file and select "Command Prompt Here". Well, I didn't find out how to do that, but I figured out how to do something even better. Add the command prompt as an External Tool.

Its rather easy to create an External Tool that opens a command prompt. Just select Tools.. External Tools...

Title: CommandPrompt
Command: c:\windows\system32\cmd.exe
Initial directory: $(ProjectDir)

Thats all there is to it. This will open a command prompt in the current project directory.

Now lets add one that opens a windows explorer to the project directory.

Title: Explorer
Command: explorer
Arguments: $(ProjectDir)

After you have created these external tools, you can then setup a shortcut or customize your menu to place them on the main menu.