The 'extract method' does not work at all. (C# in VScode)

image

Anything else works, but when I try to use the extract method, the above pops up. I tried various methods and confirmed them.

  1. The C# Dev Kit and IntelliCode for C# Dev Kit extensions are properly installed.

  2. Updated Visual Studio Code and all extensions to the latest version.

  3. Recheck the OmniSharp settings.
    {
    “dotnet.server.useOmnisharp”: true,
    “format.enable”: true,
    “semanticHighlighting.enabled”: true,
    “showOmnisharpLogOnError”: true,
    “omnisharp.autoStart”: true,
    “omnisharp.enableEditorConfigSupport”: true,
    “omnisharp.useModernNet”: true,
    “omnisharp.enableDecompilationSupport”: false,
    “omnisharp.enableAsyncCompletion”: false,
    “omnisharp.enableLspDriver”: false,
    “omnisharp.maxProjectFileCountForDiagnosticAnalysis”: 1000;
    “suppressDotnetInstallWarning”: false
    }

I tried resetting everything, but the extract method still didn’t come up. I have no idea what the problem is. I would appreciate it if you could tell me a way to solve it.

Hi Omary_KOO,

Have you already seen this thread?

If you cannot make “extract method” work, don’t waste your time with that irrelevant feature. Create a new method, and paste the code there.


See also:

1 Like

I got it.
Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms