Colonel Panic
Colonel Panic

Reputation: 137782

How to stop a build in Visual Studio?

In Visual Studio, how do I stop a build?

The build must be stopped before the solution can be closed.

enter image description here

I found this article on MSDN http://msdn.microsoft.com/en-us/library/bb399140.aspx but it's about Team Fortress Server rather than Visual Studio

Upvotes: 33

Views: 23236

Answers (4)

Westley
Westley

Reputation: 71

I had this trouble on a .NET MAUI project in VS 2022, and it would not stop with the ctrl+break, or the Build > Cancel menu item. Here was how I found I could clear it-

  1. Open Task Manager (right click on task bar and click 'Task Manager')
  2. On the Processes tab find the Microsoft Visual Studio 2022 process, and click the chevron next to it to expand
  3. Right click on each MSBuild.exe instance running under VS, and click 'End task'

This should pull VS out of being in the build state (screenshot below)- enter image description here

Upvotes: 1

MCoder
MCoder

Reputation: 113

Ctrl + Break works mostly. In some keyboard 'Break' key may only have the wording 'Pause'.

In case the build is 'Queued', Right-click an in-progress build definition name in the Queued tab of Build Explorer, and then click Stop on the drop-down menu. Alternately, you can click the Stop icon in the toolbar of the Queued tab of Build Explorer.

MSDN Link

Upvotes: 1

Brandon
Brandon

Reputation: 70052

You can use Ctrl+Break or Build -> Cancel in the menu

Upvotes: 21

Benjamin Danger Johnson
Benjamin Danger Johnson

Reputation: 1221

In the main menu click Build -> Cancel

Upvotes: 62

Related Questions