3

I’m learning C# as my first language using VSCode (macOS) with Microsoft’s C# extension. It’s been going smoothly, until suddenly it stopped showing errors as I write.

When I write the wrong syntax, the "PROBLEMS" panel does not show errors. It only shows errors when I run the code. Earlier this wasn't the case. How do I fix this? IMAGE HERE

Through searching online I think the problem is with Omnisharp; I've tried re-installing the C# extension, re-installing vscode, doing the "Omnisharp: Restart Omnisharp" command, but to no avail. I saw one solution was to “start omnisharp,” but I couldn’t find out how to do that.

Extensions I have:

  • C# for Visual Studio Code (powered by OmniSharp) 1.25.0
  • vscode-icons

Solutions I’ve tried (none have worked):

1: https://stackoverflow.com/a/68013626/495455 enter image description here

2: https://stackoverflow.com/a/72404936/224734 enter image description here

Any help is appreciated, thank you in advance!

Mizukukun
  • 31
  • 4
  • Add a screenshot to show us this, whats the problem no red squiggle underlines? What Extensions do you have - none that conflict? – Jeremy Thompson Jun 09 '22 at 08:01
  • Added! The problem isn’t ‘no red squiggles,’ it’s that the errors aren’t being detected in the problem panel as I write code. I attached an image for reference! – Mizukukun Jun 09 '22 at 08:11
  • Maybe your code is perfect. :-) – Skin Jun 09 '22 at 08:35
  • @Skin its missing a semicolon line terminator. OP I'd be tempted to add the Unity tag to this question, its more and more looking like C# Mac AND Unity related. This solution keeps coming up: https://stackoverflow.com/a/68013626/495455 – Jeremy Thompson Jun 09 '22 at 08:36
  • @JeremyThompson ah alright! I’ll try that solution in a bit and will update. – Mizukukun Jun 09 '22 at 09:02
  • Does this help: https://stackoverflow.com/a/72404936/224734 ? There was an update of the c# extension and you may need to change a setting. – frankhermes Jun 09 '22 at 09:44
  • I seem to recall the last statement can omit the semi colon. Do any other mistakes show up? – BugFinder Jun 09 '22 at 10:03
  • @frankhermes I found the setting, but nothing changed. I added the image in the post for reference! – Mizukukun Jun 09 '22 at 10:06
  • @JeremyThompson I looked for the closest settings to the ones described, though the error message shows up. (See post) – Mizukukun Jun 09 '22 at 10:06
  • @BugFinder no errors are recognized; I tried using an old file where it worked before but nothing works. – Mizukukun Jun 09 '22 at 10:07
  • i have the same problem, m1, latest macos, latest vscode, tried all the omnisharp settings change, latest dotnet installed , it does not output nothing on Run (even with omnisharp logging set to Trace). – George Dima Aug 20 '22 at 17:48

0 Answers0