Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

Did you know… you can have your External Tool’s text displayed in the Output Window? - #204

At the bottom of the External Tools dialog, you’ll see more options for customizing the external tool within visual studio.  Today’s tip is about the Use output window option.  The idea here is you’re running a .bat file, and you want to track the progress within Visual Studio.  (and if you have a great real-world example, please leave a comment.)

Using the command prompt as the tool, you can set the Arguments to something like “/C echo $(CurText)” where

/C – from cmd.exe, carries out the command specified by string and then terminates

and

$(CurText) is a token that comes from Visual Studio that represents the currently-selected text.

Current Text Token

Now running this external tool with a line of text selected in the editor, we get the following in the output window:

Command Prompt Output in Output Window

 

Technorati Tags: ,
Posted: Tuesday, April 29, 2008 3:00 AM by saraford

Comments

MarcT said:

Real-world example:

I've got the TFPT command BranchHistory set as an external tool, and the resulting history appears in the output window.

# April 29, 2008 12:17 PM

Johan Sassner said:

Thanks Saara for a great series of blogs. I read every one of them. Keep the great work going!

/Johan

Stockholm, Sweden

# April 29, 2008 1:56 PM

Ron said:

How do you extend the External Tools to display more than 3 items on the Tools menu?  OOB it only shows 3, and if you add more than three external tools they don't seem to show up on the menu.  How do you resolve this?

# June 19, 2008 10:39 AM
New Comments to this post are disabled
Page view tracker