In VS2015, I'm working on native C++ if that matters, all the warnings in the Error List are doubled. I know headers will be included multiple times, but I can see that an item for a .cpp file is listed twice with the same line number and identical contents.
I've disabled any extensions I can, and the filter option is set for "Build Only" (not also showing Intellisence errors). (The only thing I found on web searches was for different kinds of projects where different tools were both finding the error)
I don't know where else to look for what's causing it.
I've redacted the project names and file names, but each item in the pair is identical in these fields as well. The bottom pair is from a Qt *.ui
code generator, not the CL task. This tells me that it's not an individual Task causing this, but something about the Error List as a whole.
They are not doubled in the Output window. This occurs even just after loading the project and building, so there is nothing leftover in the Error List memory from a previous compile.
To display the Error List, choose View > Error List, or press Ctrl+\+E.
You can click on the summary or press Ctrl+Shift+M to display the PROBLEMS panel with a list of all current errors. If you open a file that has errors or warnings, they will be rendered inline with the text and in the overview ruler.
In my experience, this issue is caused by setting MSBuild verbosity to Normal instead of Minimal. So the simplest, least destructive, fix is: Tools...Options...Projects and Solutions...Build and Run...MSBuild project build output verbosity: Minimal.
First try if you can reproduce this behavior with an minimal C++ example (plain commandline application without Qt). Create a new project from "File" -> "New" -> "Project" -> "Visual C++" -> "Empty Project"
and add only one C++ file as new item. i.e.
int main() {
long a = 1;
float b = a;
}
If your problem still persists try to reset your Visual-Studio Settings: To do this select from the Menubar "Tools" -> "Import and Export Settings Wizard" -> "Reset all settings" -> "No, just reset settings, overwriting my current settings"
. After doing this & performing a full rebuild, it should not list any error/warning twice anymore (except for the case, that you have the same error/warning really occurring twice in the affected lines - but I doubt, this is the case for you). It's possible that either from an update or by accidently changing some settings, Visual studio was performing two stages of compilation - in this case all errors & warnings are listed two times too: i.e. when building a WPF application that uses a XAML file this is the case.
One possibility is that you are looking at the Error List Window with the window configured to show both Build and Intellisense errors.
If that's the case, look for a drop-down box to the right of the Errors, Warnings and Messages buttons. The box will say "Build+Intellisense". Change it to "Build Only" or "Intellisense Only" as desired.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With