5

I faced the problem: whenever I open my working solution Visual Studio automatically starts build. I cannot find configurations to turn off this.

It looks like that problem is in solution, because I opened another solution and build did not start automatically.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Volter1989
  • 93
  • 1
  • 7
  • There are a number of build targets that are executed to support intellisense. Setting dependencies on such targets (or their dependency list) can cause chain reactions that in turn result in a full build. Especially code generation at build time can trigger these kinds of events... See: https://learn.microsoft.com/en-us/visualstudio/msbuild/visual-studio-integration-msbuild?view=vs-2019#design-time-target-execution – jessehouwing Aug 14 '19 at 09:32
  • Having git hooks or other source control options that touch the last changed dates of files can also cause issues. – jessehouwing Aug 14 '19 at 09:34
  • What's the project in your solution, if disable the `auto build on browser request` option in `Tools=>Options=>Projects and Solutions=>Asp.net core=>General`, the issue persists? I haven't met or even heard about this kind of issue, maybe you can try repair VS or check if any third-party extension causes this strange behavior. – LoLance Aug 14 '19 at 10:08

2 Answers2

3

This strange behavior is not expected one for VS2019. Please try:

1.Tools=>Import and Export Settings=>Reset all settings=>No, just reset settings to reset current VS settings to default.

2.Use vs installer to repair your VS if there's something broken with IDE.

3.Extensions=>Manage Extensions=>Installed=>Tools you can disable(don't need to uninstall) some third-party extensions and restart VS to check if this issue persists. To check if this issue is about VS itself or extensions.

4.Exit VS and delete the .vs, bin, obj folders of the projects in the solution, and then clear the cache, for VS2019, the corresponding folder is 16.0 instead of 14.0. After that, restart VS.

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • I found that Resharper caused this behavior. When I disabled it - no auto build started. I try to figure something out with resharper now. – Volter1989 Aug 23 '19 at 09:21
  • 1
    You can post this issue to resharper website if this issue only occurs when resharped enabled. If tip3 in my answer helps resolve the issue, you could consider marking it as answer :) – LoLance Aug 23 '19 at 09:32
2

For me, this was a Resharper setting. When I turned this off it stopped happening. I think there is also a setting for Visual Studio to do this as well, but it is off by default. enter image description here

chrisb
  • 937
  • 1
  • 10
  • 22