views:

35

answers:

1

I am looking to improve my personal development process. I would like to create a batch file or similar that I can run from Windows PowerShell or the plain-old command line that does the following:

  1. Compiles my solution (e.g. C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /m:8 "%CD%\MySolution.sln")
  2. If the compilation was successful, run it in debug mode, attaching the visual studio debugger, otherwise stop.

In essence, I am trying to replicate the behavior of pressing F5 in Visual Studio, but invoked from the command line. Is this possible? The reason for all this, is that I find the VS UI responsiveness degrades significantly when invoking MSBuild commands from within the IDE.

+1  A: 
msbuild 

if($?) {
     # launch your process
     Debug-Process -name "<Your Process Name>"
}
Doug Finke