question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OmniSharp server doesn't start ([ERROR] Error: command 'dotnet.test.run' already exists)

See original GitHub issue

Cannot use C# in my unity project because omnisharp server doesn’t start

The same issue was described in #2952 and has been closed earlier but the problem still appears

OmniSharp version 1.34.11

OmniSharp server started.
    Path: C:\Users\Emin\.vscode\extensions\ms-vscode.csharp-1.21.11\.omnisharp\1.34.11\OmniSharp.exe
    PID: 13516

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Visual Studio Enterprise 2019 16.4.29613.14 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
            2: StandAlone 16.3 - "C:\Users\Emin\.vscode\extensions\ms-vscode.csharp-1.21.11\.omnisharp\1.34.11\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Visual Studio Enterprise 2019 16.4.29613.14 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'c:\Users\Emin\Unity\Repos\PPrototype'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in 'c:\Users\Emin\Unity\Repos\PPrototype\PPrototype.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Users\Emin\Unity\Repos\PPrototype\Assembly-CSharp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Users\Emin\Unity\Repos\PPrototype\Assembly-CSharp-Editor.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Users\Emin\Unity\Repos\PPrototype'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Users\Emin\Unity\Repos\PPrototype\Assembly-CSharp.csproj
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Users\Emin\Unity\Repos\PPrototype' on host 19116.
[ERROR] Error: command 'dotnet.test.run' already exists

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:6
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
lpricharcommented, Feb 17, 2020

fwiw I just got this error and do not have the vscode-solution-explorer extension. I disabled all my extensions and re-enabled them one-by-one and the error resolved itself 😐. Maybe a race condition with some other plugin? Here are my plugins in case it helps someone else diagnose which ones were conflicting:

  • C#
  • Cake
  • Docker
  • GitLens
  • Numbered Bookmarks
  • Powershell
  • Prettier
  • Remote - WSL
  • TSLint
0reactions
marcusoftnetcommented, May 22, 2020

For what it’s worth, the issue is pretty old, I reinstalled the C# plugin and then it started to work again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Omnisharp can't start dotnet - Stack Overflow
In your terminal enter: where dotnet. Set this directory for omnisharp.dotnetPath in your VSCode preferences.
Read more >
NETSDK1045: The current .NET SDK does not support 'newer ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
[Solved] Problems with OmniSharp and Visual Studio Code
Startup ] Omnisharp server running using Stdio at location 'c:\Users\Tetriser\Documents\Unity\MagneticKart' on host 5560.
Read more >
Hello OmniSharp on .NET 6.0! | StrathWeb. A free flowing web ...
This is a big milestone in the OmniSharp project as the .NET ... There is now a new . ... Ready to run...
Read more >
Language Server Extension Guide - Visual Studio Code
With Language Servers, you can implement autocomplete, error-checking ... Explain how to run, debug, log, and test the Language Server extension.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found