15

Using latest VS2022 preview (but have this also on stable) C++ (VC17)

What I often get is that I build or rebuild, then get some warnings in

  • the editor (green wriggly line)
  • the output window
  • the Error list window under "warnings"

I then fix a warning in the editor, but now

  • editor ok (green wriggly line gone)
  • output window correctly does not show the warning anymore
  • Error list / Warnings still show it :( it seems to now be out of sync with the editor

The only way I can then refresh the warnings in the Error List is to unload+reload the solution which is not workable

Any help ?

  • but even though the blue it does not disappear
kofifus
  • 17,260
  • 17
  • 99
  • 173
  • 2
    Did you ever find a solution to this? I've just moved to VS2022 and finding similar issues (C# projects). I find this and the code analysis experience is terrible. Errors and warnings seem to appear and disappear at random, and the whole approach to configuring VS code analysis is really poor. – Andrew Stephens Jun 30 '22 at 08:16
  • Unfortunately I don't remember how I sorted it out but it went away. Try starting a new project and bringing all your sources in I think that's what did it. I also upgraded to latest preview – kofifus Jul 01 '22 at 22:34
  • 1
    It is still a problem using 17.3.3 –  Sep 10 '22 at 03:49
  • 3
    Still problem with 17.4.1 – Adronius Nov 22 '22 at 17:39
  • This also happens to me with .NET 6/7 projects in 17.4.2 – Dave Black Dec 09 '22 at 22:20
  • 17.5.1. Still happening. – Rei Miyasaka Mar 11 '23 at 03:35

1 Answers1

1

To temporarily resolve this intermittent behavior, consider deleting .vs hidden sub-folder in the same folder as the solution when the solution is closed.

I believe that gunk in internal database resulting from VS upgrades, as well as from crashes with disk cache turned on cause a whole bunch of this unhappy user experience.

On modern SSD/NVMe drives, try disabling the write cache in the device manager. It might provide good prevention, yet without imposing undue performance hit. Test, test, and test again, my friend.

GregC
  • 7,737
  • 2
  • 53
  • 67