Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Errors in Visual Studio 2019 inconsistently show up in Error List

I recently updated from Visual Studio 2017 Community Edition to Visual Studio 2019 Community Edition.

Now, if I build my solution with errors, they will show up in the build output, but not all of them will appear in the error list. It would appear only errors of open files will show up in the error list. This is incredibly annoying.

I am not alone in this issue. It has been reported many times on Microsoft's forums, but no one has a definitive solution.

I have tried a variety of solutions people suggested in those threads:

  • I have ensured the filters are legitimate: Entire Solution, Errors enabled, Build + Intellisense.
  • I have tried deleting the .vs folder and restarting Visual Studio.
  • I just updated to the very latest Visual Studio 2019 version. Supposedly there are many different versions of this error, happening in versions of Visual Studio all the way back to 2017. Some supposedly have been fixed...?
  • I have disabled parallel project loading.

I have experienced this before in other versions of Visual Studio with Razor pages. To my knowledge, that's to be expected in Razor though.

The only other factor that I severely doubt impacts anything is that it's a Visual Studio project generated by Unity editor. From what I've read, ASP.NET, Razor, Xamarin, and other frameworks have each had their own version of issue reported. Perhaps Unity is afflicted by it too, but I don't see how or why. I doubt Unity's auto-generated Visual Studio projects are that different from your standard library projects.

like image 861
Zoop Avatar asked Aug 19 '19 04:08

Zoop


People also ask

How do I show build errors in Visual Studio?

To display the Error List, choose View > Error List, or press Ctrl+\+E.

How do I fix Visual Studio build errors?

In Visual Studio, go to the menu bar and choose Help > Send Feedback > Report a Problem, or submit a suggestion by using Help > Send Feedback > Send a Suggestion.

How do you fix there were build errors?

Tools > Options > Projects and Solutions > Build and Run The selection in the second dropdown “On Run, when build or deployment errors occur”, even if the code has the error during the run, project runs with the last successful build. That's why it should be changed.


2 Answers

I have now installed Visual Studio 2019 on two separate machines, and it appears that "Full Solution Analysis" is disabled by default.

Simply check the checkbox in options and everything seems to work as it did previously: Enable Full Solution Analysis

like image 152
Zoop Avatar answered Oct 21 '22 14:10

Zoop


For those using Visual Studio 2019 v16.9.1 make sure your Error List window looks something like this:

Error List Window

The important part for me was selecting Build + IntelliSense (previously it was set to Build Only which explains why the error list would only refresh on build).

like image 2
Eric Mutta Avatar answered Oct 21 '22 16:10

Eric Mutta