Visual Studio not displaying compile time errors in editor

后端 未结 8 1252
南旧
南旧 2020-12-28 12:32

For example, when I write:

string x = \"turtle\";
x.Go();

There is no red squiggly line detecting the absence of the Go() method on String.

相关标签:
8条回答
  • 2020-12-28 12:34

    Restarting VS solved my problem once.

    0 讨论(0)
  • 2020-12-28 12:35

    my solution; I know it won't help like 80% of the viewers, but for the sake of who it will: i have had a lot of noise in the IOS part of the solution, a VS bug that showed a lot of errors that weren't supposed to appear, so I just deleted the IOS part because I didn't really needed it as I didn't even had a Mac server to test it on... Something happened after that and the squiggly line returned! Seriously, VS team, fix your bugs...

    0 讨论(0)
  • 2020-12-28 12:47

    For visual studio 2015 and higher:

    Go to: Tools > Options > Text Editor > C# > Advanced > Editor Help

    Then select: Enable Full solution analysis

    0 讨论(0)
  • 2020-12-28 12:48

    Select Tool -> Options, then Text Editor. Under the language you are using (ie C#), go to the Advanced and make sure the Underline errors in the editor and Show live semantic errors are checked

    0 讨论(0)
  • 2020-12-28 12:49

    Stop the project. Open Folder Project. Delete .vs folder (he is a hidden folder) Then restart Visual Studio

    0 讨论(0)
  • 2020-12-28 12:51

    You need to turn on the underline errors in the editor and show live semantic errors options in Visual Studio.

    These options can be found here:

    Tools > Options > Text Editor > C# > Advanced > Editor Help

    Edit: You will need to install SP1 for this functionality to work.

    0 讨论(0)
提交回复
热议问题