开发者

Run a solution in debug mode if MSBuild compilation is successful from the command line

开发者 https://www.devze.com 2023-01-21 21:41 出处:网络
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:

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开发者_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>"
}
0

精彩评论

暂无评论...
验证码 换一张
取 消