How to cancel/abort a build? (Visual Studio 2013)

There is a “Cancel” button under the BUILD menu in Visual Studio 2013 and I used it before so usually it works. But I cannot get it to work with the Unreal Engine build Tools. In other words, pressing the button will not do anything other than clear and stop updating the Output window.
After that I can still see the processes running in the Task Manager and if I wait for as long as it takes for the build to finish, they end properly. Obviously it’s not so great that the resources (RAM, CPU) are still being used and I effectively still have to wait not getting updates on the progress anymore.
Killing the processes manually in the Task Manager does not really seem to work either. They will either just pop up again or not even allow me to kill them (but that might be because I am not logged in with administrator privileges). Anyway this seems like a terribly hacky way to do it and I would prefer a proper solution.

So has anyone gotten the cancel build button to work or suffered from the same issue? Or am I the only one that hits the build button only to realize they forgot something shortly after?

Thank you for your time.

P.S.: If this would have been more appropriate in the Engine Source & GitHub section, feel free to move it there. For me the problem is mostly relevant when building the engine from source but larger projects should also be affected by this.

Click on Build output window in Visual Studio (so it receives input focus), then press Ctrl+Break.

Thank you very much for the quick response.

I’ve done exactly what you suggested and what I tried before (Ctrl+Break is bound to the same action as the Cancel button I mentioned above) yet this is what the Task Manager looks like five minutes later:

As you can see the output states that the Task/Build has been canceled yet cl.exe is still up an running as is UnrealBuildTool.exe :frowning:
Is it actually working for you and it’s just something wrong with my VS installation possibly?

Yes, it flawlessly works for me, however, I have new project without too many files in it at the moment.

I’m using Visual Studio Community 2013 (version 12.0.31101.00 Update 4), with Unreal Editor version “4.9.2-2707645+++depot+UE4-Releases+4.9” on windows 7 64bit.

At the moment I’m not sure what could cause this problem in your case. I would check antivirus software (because occasionally it interferes with compilation), but honestly, that’s just a wild guess.

You could try checking if there are available updates for your visual studio, check system logs for possible errors, or see if someone else has better idea about possible cause of this problem.

So I’ve tried your suggestion and disabled my antivirus to see whether this would change anything. Unfortunately it doesn’t, thank you for the suggestion. At least it’s good to know that it is intended to work.

I’m using Visual Studio Ultimate 2013 (version 12.0.40629.00 Update 5) and Unreal Engine 4.9.1 release branch GitHub source (according to log file version: 4.9.1-0+++depot+UE4-Releases+4.9) on Windows 7 64bit. If that helps. Also I have NVIDIA Nsight 4.7 installed but other than that nothing special that would come to my mind. Whether I run Visual Studio with admin privileges or not does not make a difference.

The only “solution” I have so far is to cancel with Ctrl+Break or by pressing the button in the menu and then to kill the UnrealBuildTool process manually. If I don’t kill it manually it is not possible to start building again.

I’m more than happy with any other ideas and suggestions for me to try. Thanks a lot.

P.S.: I’ll try it on a different machine next week and report back with any results.

Yeah I get this issue sometimes, UBT seems to crash and doesn’t kill itself when you stop building. THe only way around it is to open Task Manager and force-quit the process. It started occurring for me in 4.9, but hasn’t happened to me for a while.

Just a quick update as I promised: I tried it on a Windows 7 Professional 64bit laptop with Visual Studio Community 2013 Update 5 (and German Language Pack). Unfortunately still the same.

Another update, please see this Answer Hub issue: Stopping build now leaves UnreaBuildTool process runningl

I experience the same problem building the engine from github source master branch. I use the following command from PowerShell (it happens frequently enough that I find this more convenient than using Task Manager):



Stop-Process -Name "UnrealBuildTool"