Visual Studio 2015 Error List only showing errors for open files

5k Views Asked by At

I'm new to Visual Studio 2015. I'm working on porting a solution from VS 2010 to VS 2015 and Entity Framework and I'm working through the compile errors. Unfortunately, to get the error messages to display in the Error List, I have to open the files first. My filter options are "Entire Solution", the show errors is toggled on, warnings are off and "Build + IntelliSense" is selected.

With no files opened, I'm getting 5 errors but when I open one of my files with errors, the list then shows all the errors for that file as well. When I clost the file and rebuild, I'm back to the original 5 error messages. I've tried the different filter options in different combinations but I'm not able to get ALL the compile errors to be displayed. I have to open a few files, fix the compile errors, open a few more, and so on.

Does anyone know if there is a fix for this?

Thanks,

Carlo.

4

There are 4 best solutions below

0
Jeppe On

As there has been no solution to this thread, I'll add mine which I tested in VS2017 15.5.2 (.NET Core 2.0) and might work with VS2015.

I found all my view-errors, by publishing:

  1. In Visual Studio, by right-clicking project and select "Publish". Create a new profile and click "Folder", which will publish your solution to a specified folder and this catches all view-errors, as your views are compiled into a .dll.
  2. You can do the same from terminal: dotnet publish -c release

I was not able to get the output when using the runtime-identifier flag (dotnet publish -c release -r win10-x64).

Hope it helps someone.

1
Etherman On

I had similar problem with Code Analysis - VS 2017 Community 15.7.2 - this may be the same issue.

https://learn.microsoft.com/en-us/visualstudio/code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code

To toggle full solution analysis:

  1. To open the Options dialog box, on the menu bar in Visual Studio choose Tools > Options.
  2. In the Options dialog box, choose Text Editor > C# or Basic > Advanced.
  3. Select the Enable full solution analysis check box to enable full solution analysis, or clear the box to disable it. Choose OK when you're done. I thought I had no warnings...now I have a few more!
0
SoftWar On

anyone coming to this issue for VS2022, please try below steps to display Solution-Wide Build-IntelliSense Errors-Warning-Messages:

open Tools-Options-Text Editor-C#-Advanced

select Run background analysis for Entire Solution

select Show compiler errors and warning for Entire Solution

0
PureJ On

In my case, it was a specific class library project that seemed to be giving all the errors. I removed the project reference and re-added it, that solved it for me. Nothing else seemed to work. Difficult error to reproduce.