visual-studio-2010aliasexternal-toolscommand-window

Can the Visual Studio (2010) Command Window handle "external tools" with project/solution relative paths?


I have been playing with the Command Window in Visual Studio (View->Other Windows->Command Window). It is great for several mouse-free scenarios. (The autocompleting file "Open" command rocks in a non-trivial solution.) That success got me thinking and experimenting:

What I am stuck on is:

  1. There doesn't appear to be a way to send parameters to an aliased command (and thus the underlying Shell call)
  2. There doesn't appear to be a way to use project/solution relative paths ($SolutionDir/$ProjectDir) on a Shell call
  3. Using absolute paths in Shell works, but is fragile and high-maintenance (one alias for each needed use case). Typically you want the command to run against a file relative to your project/solution.
  4. It seems you can't run the traditional external tools (Tools->External Tools...) in the command window

Ultimately I want the external tool functionality in the command window in some way. Can anyone see a way to do this? Or am I barking up the wrong tree?

So my questions:

  1. Can an "external tool" of some sort (using relative project/solution path parameters) be used in the Command Window?
  2. If yes, How?
  3. If no, what might be a suitable alternative?

Solution

  • Seems as if there may, indeed, be a (much) better approach.

    How about a VS extension that embeds powershell into the IDE and allows one to use DTE (Visual Studio Automation Objects)?

    Yeah. That would do the trick and much more.

    "An interactive, scriptable shell?" you ask? "Yes!" I say.