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:
- Compiles my solution (e.g.
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /m:8 "%CD%\MySolution.sln"
) - If the compilation was successful, run it in debug开发者_Python百科 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.
msbuild
if($?) {
# launch your process
Debug-Process -name "<Your Process Name>"
}
精彩评论