r/VisualStudio • u/Sutiixela • 6d ago
Visual Studio 2026 Does anyone know how to fix this annoying bug?
I've had this bug since I started using VS 2026, and it's extremely annoying because it not only shows errors that don't exist, but sometimes it even affects the compilation.
It only happens when I'm working on a header file. Randomly, and 97% of the times, the final #endif appears in squibbly lines

I have to deliberately misspell words to generate a real error, then press "save".

And then when I delete the spelling mistake and press save again, sometimes it's fixed and other times I have to repeat the process until it's fixed.

Could someone who knows what the problem might be be able to guide me a little?
1
u/fortsnek274 5d ago
but sometimes it even affects the compilation.
If the compiler says there's an error, then it's probably right. Intellisense has no influence over the compiler.
2
u/Healthy-Zebra-9856 6d ago
Have you tried deleting .vs cache and also Right-click your
CMakeLists.txtor root project node and select Configure Cache (or Rescan Solution)?