28

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?

Community
  • 1
  • 1
David
  • 4,665
  • 4
  • 34
  • 60

3 Answers3

35

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

Ben Hayward
  • 1,444
  • 23
  • 37
  • 1
    This definitely keep the error message for me, however, it was only an ancillary error caused by another error only available in the output. Still, this solved the disappearing error problem. – Michael Silver Apr 23 '18 at 14:22
  • I don't understand. How is hiding the error message solving the problem? – Jens Mander Oct 11 '18 at 15:38
  • Under Error list, select "Entire solution" instead of "Open Documents" (as done by Ben Hayward) – mathengineer Jan 21 '19 at 09:12
  • @JensMander You are right in a way, it doesn't. But in my case I have an old ASP.net website with almost 1600 errors in about 40 different files. To make them all disappear, I would need to open them one by one and wait 5 seconds. And this would only help until I change some code and then it all comes back. So, for me, it is a huge help. If you have figured out a better solution, please let me know, I am also still looking for a better solution. – Crick3t Feb 28 '19 at 09:18
14

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.

Nenad Birešev
  • 377
  • 2
  • 10
0

Perhaps this warnings is comming from code analysis, try to run only code analysis on your solution.

Henrique
  • 602
  • 4
  • 18
  • 1
    I have done that and the errors are totally different. THEY actually DO show up in the error list window. – David Apr 14 '16 at 23:27