Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 disable auto-building solution on save

Tags:

I am using Visual Studio 2019 enterprise to work on a .NET project. I wasn't noticing it before, but it seems like every time I am saving a file, the solution is building. I am inferring this because when I save, I can see a number with a red X next to it in the bottom pane. And if i click on the bottom pane, it will open up a console showing me build errors. This changes every time I save.

This is an annoying "feature". I searched for multiple solutions, but none of them work. The "code analysis" option for a solution is deprecated, so you can't change it. I don't have any abnormal extensions either, so this looks like a VS feature.

like image 802
Jeremy Fisher Avatar asked May 20 '20 23:05

Jeremy Fisher


People also ask

How do I disable buildonsave in Visual Studio?

There is a menu named BuildOnSave in the Visual Studio menu bar with options to disable BuildOnSave, build the whole solution in its active configuration, or the startup project only. The options are stored per solution. An output "pane" is registered for BuildOnSave and activates as soon a build starts.

How do I build a startup project in Visual Studio 2017?

On the menu bar, choose Tools > Options. In the Options dialog box, expand the Projects and Solutions node, and then choose the Build and Run page. The Build and Run > Projects and Solutions > Options dialog box opens. Select the Only build startup projects and dependencies on Run check box.

How do I clear the Build solution in Visual Studio Code?

On the menu bar, choose Debug > Start ( F5 ). On the menu bar, choose Build > Build Solution ( Ctrl + Shift + B ). When this check box is cleared, all projects, their dependencies, and the solution files are built when you run either of the preceding commands. By default, this check box is cleared.

How do I Turn Off source analysis in Visual Studio?

To open this page, right-click the project node in Solution Explorer and select Properties. Select the Code Analysis tab. To disable source analysis at build time, uncheck the Run on build option. To disable live source analysis, uncheck the Run on live analysis option.


1 Answers

Another one but very similar cause of the automatic rebuild and restart is Auto build and refresh browser after saving changes option under the Tools -> Options -> Projects and Solutions -> ASP .NET Core settings.

Just set it to None or any other option than Auto build and refresh browser after saving changes.

enter image description here

like image 50
dodbrian Avatar answered Oct 11 '22 13:10

dodbrian