<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Did you know… You can run external tools within Visual Studio? - #201</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx</link><description>It’s the External Tools Tip of the Day series!! Okay I have to admit, I’m not the local expert in External Tools, so I could really use help with examples.&amp;#160; I can talk about the functionality all day long, but nothing is better than real world examples.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Did you know… You can run external tools within Visual Studio? - #201</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx#8421580</link><pubDate>Thu, 24 Apr 2008 16:25:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8421580</guid><dc:creator>Steve Andrews</dc:creator><description>&lt;p&gt;I have a bunch of External Tools set up. &amp;nbsp;Some examples are invoking MSBuild for a custom build file and getting the strong-name signature for a signed (and compiled) project.&lt;/p&gt;</description></item><item><title>re: Did you know… You can run external tools within Visual Studio? - #201</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx#8421607</link><pubDate>Thu, 24 Apr 2008 16:45:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8421607</guid><dc:creator>Serge Wautier</dc:creator><description>&lt;p&gt;&amp;gt; but never knew it came directly from the External Tools dialog&lt;/p&gt;
&lt;p&gt;You mean there's a human being behind this blog? :-)&lt;/p&gt;</description></item><item><title>re: Did you know… You can run external tools within Visual Studio? - #201</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx#8422093</link><pubDate>Thu, 24 Apr 2008 19:31:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8422093</guid><dc:creator>MarcT</dc:creator><description>&lt;p&gt;I have several of the TF Power Tools linked there, such as Branch History and Blame/Annotate. It's easy to set the arguments to the currently active file, so it's almost like they're built in.&lt;/p&gt;
&lt;p&gt;The other tip is to assign them keyboard shortcuts, which is a pain because they show up there as &amp;quot;External Tool 1&amp;quot;, and I've got do figure out which tool that means.&lt;/p&gt;</description></item><item><title>re: Did you know… You can run external tools within Visual Studio? - #201</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx#8422376</link><pubDate>Thu, 24 Apr 2008 21:30:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8422376</guid><dc:creator>Chris Martinez</dc:creator><description>&lt;p&gt;One of my personal favorite uses of &amp;quot;External Tools&amp;quot; is setting up the CScript debugger to automatically start debugging scripts directly from Visual Studio .NET.&lt;/p&gt;
&lt;p&gt;Admittedly, I've shifted most of my scripting to PowerShell these days, but there is still the occasional need for JScript and/or VB Script. &amp;nbsp;Debugging standalone scripts is usually a pain. &amp;nbsp;Using the &amp;quot;External Tools&amp;quot; dialog you can make it a snap!&lt;/p&gt;
&lt;p&gt;Steps to setup the CScript debugger to launch and debug your script directly from Visual Studio:&lt;/p&gt;
&lt;p&gt;1) In Visual Studio, Tools -&amp;gt; External Tools&lt;/p&gt;
&lt;p&gt;2) Click &amp;quot;Add&amp;quot;&lt;/p&gt;
&lt;p&gt;3) Title = CScript Debugger&lt;/p&gt;
&lt;p&gt;4) Command = C:\Windows\System32\cscript.exe&lt;/p&gt;
&lt;p&gt;5) Arguments = //NOLOGO //X &amp;quot;$(ItemPath)&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; NOTE: The $(ItemPath) VS Marco maps the path to&lt;/p&gt;
&lt;p&gt; &amp;nbsp; the script you currently have open&lt;/p&gt;
&lt;p&gt;6) Initial Directory = &amp;quot;$(ItemDir)&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; NOTE: The $(ItemDir) VS Marco maps the directory&lt;/p&gt;
&lt;p&gt; &amp;nbsp; to the script you currently have open. &amp;nbsp;This&lt;/p&gt;
&lt;p&gt; &amp;nbsp; addresses path resolution if your script relies&lt;/p&gt;
&lt;p&gt; &amp;nbsp; on external files located in the same relative&lt;/p&gt;
&lt;p&gt; &amp;nbsp; directory.&lt;/p&gt;
&lt;p&gt;7) Check &amp;quot;Use Output Window&amp;quot;&lt;/p&gt;
&lt;p&gt;8) Click OK&lt;/p&gt;
&lt;p&gt;If you want to get even fancier, you can add a custom toolbar button (and/or toolbar) and attach the external command to it. &amp;nbsp;Essentially, you can make a &amp;quot;Run&amp;quot; button just like you have for other .NET code.&lt;/p&gt;
&lt;p&gt;To debug a script, open any compatible script in Visual Studio. &amp;nbsp;For example (HelloWorld.js):&lt;/p&gt;
&lt;p&gt;function main()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;WScript.StdOut.WriteLine( &amp;quot;Hello world!&amp;quot; );&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;main();&lt;/p&gt;
&lt;p&gt;Now either click Tools -&amp;gt; CScript Debugger or your fancy toolbar button. &amp;nbsp;The Visual Studio &amp;quot;Just-In-Time Debugger&amp;quot; dialog will pop up. &amp;nbsp;Select the current instance you are using. &amp;nbsp;(I've never figured out how to automatically select the current running instance of VS.NET as the debugger, but that would be a nifty addition). &amp;nbsp;The debugger will break on the first executable line of code in the script. &amp;nbsp;Debugging can resume using all of the typical Visual Studio .NET debugging features.&lt;/p&gt;
&lt;p&gt;You'll also notice that since the &amp;quot;Use Output Window&amp;quot; is checked, the standard output is directed to Visual Studio. &amp;nbsp;If you open the Output Window (View -&amp;gt; Output) and change the option in &amp;quot;Show output from&amp;quot; to &amp;quot;CScript Debugger&amp;quot;, you will see all of the redirected output. &amp;nbsp;In this case - &amp;quot;Hellow world!&amp;quot;.&lt;/p&gt;
&lt;p&gt;Happy scripting and debugging!&lt;/p&gt;</description></item><item><title>re: Did you know… You can run external tools within Visual Studio? - #201</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx#8423746</link><pubDate>Fri, 25 Apr 2008 12:32:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8423746</guid><dc:creator>Gregor Suttie</dc:creator><description>&lt;p&gt;Ben's blog shows you an example such as you mentioned - in this case how to run subsonic from the VS IDE&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blog.benhall.me.uk/2007/10/setting-up-subsonic.html"&gt;http://blog.benhall.me.uk/2007/10/setting-up-subsonic.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Gregor&lt;/p&gt;</description></item><item><title>re: Did you know… You can run external tools within Visual Studio? - #201</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx#8424864</link><pubDate>Sat, 26 Apr 2008 02:02:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8424864</guid><dc:creator>Ben Hall</dc:creator><description>&lt;p&gt;Thanks for point that out Gregor.&lt;/p&gt;
&lt;p&gt;Readers might also be interested in this post about executing unit testing frameworks&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blog.benhall.me.uk/2008/01/executing-mbunit-gui-and-console-from.html"&gt;http://blog.benhall.me.uk/2008/01/executing-mbunit-gui-and-console-from.html&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Did you know… You can run external tools within Visual Studio? - #201</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx#8435639</link><pubDate>Mon, 28 Apr 2008 19:13:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8435639</guid><dc:creator>Mike Adams</dc:creator><description>&lt;p&gt;This is my favorite external tool: Windows Explorer&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://dotnettipoftheday.org/tips/explorer-in-tools-menu.aspx"&gt;http://dotnettipoftheday.org/tips/explorer-in-tools-menu.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I also set a keybinding, so I can select the file from the solution explorer, press CTRL + M, CTRL + E and see the file in Explorer. This is extremely handy for batch files in the solution and editing the Web.config outside of source control.&lt;/p&gt;</description></item><item><title>Visual Studio 2008 每日提示(二十一)</title><link>http://blogs.msdn.com/saraford/archive/2008/04/24/did-you-know-you-can-run-external-tools-within-visual-studio-201.aspx#9274811</link><pubDate>Mon, 05 Jan 2009 03:55:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9274811</guid><dc:creator>xjb</dc:creator><description>&lt;p&gt;本篇包括tip191-tip200&lt;a rel="nofollow" target="_new" href="http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-21.html#201"&gt;http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-21.html#201&lt;/a&gt;、在v...&lt;/p&gt;
</description></item></channel></rss>