5

The VSCode "quick fix" has never been available for me in C#.

Even the most basic quick fix, like importing namespaces for class, auto-implement missing methods from interface, are not available.

I am not sure what went wrong (or maybe this is normal in VSCode? I came from VS Studio C# and these options are available there. Maybe I am just assuming too much).

Here is a very simple illustration of what I meant (Sorry for the Chinese error message - I am not sure how to change Omnisharp locale. It is the standard Compiler complaint saying that you are not implementing one of the interface method):

No quick fix

Environment:

  • Microsoft C# Plugin (ms-dotnettools.csharp): v1.24.4
  • VSCODE: v1.66.2 (user setup)
  • OS: Windows 10

I tried:

  • Using "Ctrl+." instead (as suggested here)
  • Adding `"omnisharp.path": "latest" to Omnisharp extension settings (as suggested here)
  • reinstalling omnisharp
  • reinstalling VsCode

So far none worked.

Reimirno
  • 148
  • 1
  • 9

1 Answers1

1

I can see that if I press cmd + . (control .) then it shows all available quick fix.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 10 '22 at 10:00
  • As already mentioned in my question, that does not work for me. Are you sure you are writing in C#? – Reimirno Aug 13 '22 at 01:13
  • It works for me. I don't know why it doesn't show the Quick Fix button, but pressing Control + . gives me the quick fix – Winston Lycan Apr 05 '23 at 17:22