Omnisharp server is not running Windows 10

I'm using VS Code to try out ASP.NET a little bit, but when I try to do: dnu restore it fails.

If I try to do it within VS Code I get a error message: Omnisharp server not running.

I don't really know what to do :( I'm running Windows 10 x64

6

7 Answers

Check the vs code Omnisharp log, Ctrl + Shift + U.

The Omnisharp server is not running error can result from a problem in your project.json causing issues with dnu restore. e.g. Issues resolving packages for one of the target frameworks?

It probably will not help but, you can try restarting Omnisharp : F1 "omni restart"

C# support is not bundled but it does sound like you have successfully installed it. Otherwise add C# with F1 "ext install", Enter, "C#"

You are right that there is little documentation

  • - introduction to project types and omnisharp
  • - yes OSX because windows instructions are for Visual Studio (page no longer available)
  • - expect better soon

Tried almost everything (resetting settings, reinstalling VS Code) to no avail. Finally I've downgraded VS Code C# extension from 1.25.0 to 1.24.4, and it worked perfectly.

0

Visual Studio Code has Omnisharp built in. However, that doesn't mean you don't have to install ASP.NET 5 and DNX.

Follow the instructions found on this guide:

Specifically, you'll want to follow these instructions:

Remember, Visual Studio is the heavyweight IDE that installs all that you need. Visual Studio Code is the lightweight node based editor that only has what you explicitly install/add to it. Thus, unlike Visual Studio, it does not automagically download ASP.NET 5 and DNX

I completely uninstalled the C# extension. Reinstalled it and change the Omnisharp timeout to 15 seconds (initially was 60). Works like a charm.

I solve this following this steps:

  1. Goto VSCODE -> File -> Preferences -> Settings
  2. Type "omnisharp" in the search toolbox
  3. Disable the "Omnisharp: Auto Start" checkbox
  4. Restart VSCODE
  5. Type ctrl + shift + p to show the command textbox and look for "Omnisharp: restart omnisharp"

Now you can use ".Net: Generate assets for build and debug"

1

Click f1 key or ctrl+shift+p to open the textbox to enter your command. Then type omnisharp server, and select the option 'Restart omnisharp server'.

You can look at its status in the bottom left corner of the window, and if you click on it, the process's status will on be displayed on the terminal.

I had this problem when I opened the .cs file separately, but then I right-clicked the project folder and chose "Open with VSCode" and it worked fine

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like