Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors/Warnings show up on "Error List" but then disappear for website project

Tags:

BACKGROUND

I have inherited a solution with multiple projects. One of the projects is a website project... or at least I'm pretty sure that's what this icon means (It looks pretty different in VS 2010 vs 2013, so I'm showing both: VS 2013 on the left, VS 2010 on the right):

project icon enter image description here

PROBLEM

When I rebuild the website project, there are 8 warnings that are generated. These correctly show up in the Error List, but only for a moment.

Warnings show up for a second or two while build is running

Once the build process finishes, they disappear.

Warnings disappear as soon as build is complete

There are a few things to note:

  1. There are no filters set and I cannot toggle any of the message types because it says there are 0 of each.
  2. Even though the errors have disappeared from my Error List, they do still show up in the output section

    Output window

  3. Warnings and errors from other projects show up in the error list without any of this weirdness
  4. This is a website project, so the property pages are dramatically different than the ones that I'm familiar with.

    property pages

  5. I've observed the same behavior with errors

I've tried different versions of VS and they both do the same thing. I've tried deleting my .suo file. I've played around with all the settings I can find that look at all relevant but nothing changes this behavior.

What am I missing?

like image 433
David Avatar asked Apr 14 '16 19:04

David


People also ask

How do I show errors in Visual Studio?

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

How do I fix Visual Studio warnings?

Right-click on your project, select "Properties". Click "Build". Switch "Treat warnings as errors" from "All" to "Specific warnings" or "None".

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.


2 Answers

I had this problem this morning. After a few minutes of fiddling around, I managed to correct it by switching the "Show issues generated" combo box from "Build + IntelliSense" to "Build Only".

Where to find the combo box to fix the error[1]

I appreciate this quite a subjective answer, and it may be that this solution doesn't work for you, but I suspect it may help to steer you on the right direction!

FYI, my symptoms were: The error list would show for 1-2 seconds after having built or pressed "Start", and then disappear showing 0 errors

like image 188
Ben Hayward Avatar answered Sep 29 '22 14:09

Ben Hayward


My issue was that I was importing a reference of the class library project which was built with .NET 4.52 version and I had .NET 4.5 version. So I switched the .NET version of the class library to .NET 4.5 and the problem was solved. Error messages didn't show this problem, but output window was displaying this error message.

like image 42
Nenad Birešev Avatar answered Sep 29 '22 13:09

Nenad Birešev