How to unassemble Visual Studio using the command line?

When I run the assembly, sometimes I see a code change that I forgot. Therefore, I want to cancel the assembly. Due to the assembly blocking my IDE, I have to use Ctrl + Break , however it does not respond fast enough.

I am looking for a command line approach, so I can just run the batch file in my quick start. I tried this command:

Taskkill /IM aspnet_compiler.exe /F 

However, this only stops the creation of the current project and starts the next one in my multi-project solution.

How can I cancel the build using the command line?

+6
source share
5 answers

I came up with a rude method that works well for me.

I have the following batch of script.

 @echo off echo KILL BILLd for /L %%i in (1,1,10) do ( Taskkill /IM aspnet_compiler.exe /F timeout 1 ) 

(Above, 10 = seconds)

Then I create a shortcut for this batch script in the same folder, which allows me to do additional ones.

  • Assign an icon image for my quick launch bar.
  • Set it to minimize.
  • Assign a global keyboard shortcut.

In VS2010, I installed CTRL + SHIFT + B , like all my builds. (do not rebuild).

For the shortcut and since my fingers tend to still move in this area when I see a forgotten code change. Keyboard shortcut CTRL + SHIFT + ALT + B.

+1
source

I had to add the /t flag to kill the entire MSBuild.exe process MSBuild.exe . I.e:

 taskkill /im msbuild.exe /f /t 

In my case, I run MSBuild.exe from Gnu Emacs, and for some reason Gnu Emacs cannot always kill MSBuild.exe if I want to restart it. I use this as a backup. I am doing C ++ in VS2010.

+14
source

Next, the build stops for all projects in all instances of Visual Studio:

 taskkill /im msbuild.exe /f 
+5
source

Unfortunately, Visual Studio is a compiler. aspnet_compiler is designed to compile views, so why do you see it in the list.

You can check by getting the process guide and looking at the process tree. You will notice that devenv never starts msbuild, csc or any other compiler. But devenv is making a splash in CPU and I / O.

+1
source

Go to the BUILD menu, and then click on the option: CANCEL. tested in VS2013.

-1
source

Source: https://habr.com/ru/post/909714/


All Articles