'Visual Studio 2022 not showing compile time errors

I am new to Visual Studio and I can't seem to make it catch compile-time errors.

As can be seen, it does catch the style errors like extra spaces.

I have seen the post Visual Studio not displaying compile time errors in editor, more specifically,

  1. https://stackoverflow.com/a/63454289/2525417
  2. https://stackoverflow.com/a/40338353/2525417

But they don't seem to work. Other solutions are for older versions of Visual Studio.

However, when I build the project it does show the errors in the window at the bottom (output window)

some errors caught some not



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source