'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
Solution 1:[1]
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.
Solution 2:[2]
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: https://code.visualstudio.com/Docs/runtimes/ASPnet5
Specifically, you'll want to follow these instructions: https://github.com/aspnet/home#upgrading-dnvm-or-running-without-visual-studio
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
Solution 3:[3]
I completely uninstalled the C# extension. Reinstalled it and change the Omnisharp timeout to 15 seconds (initially was 60). Works like a charm.
Solution 4:[4]
I solve this following this steps:
- Goto VSCODE -> File -> Preferences -> Settings
- Type "omnisharp" in the search toolbox
- Disable the "Omnisharp: Auto Start" checkbox
- Restart VSCODE
- 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"
Solution 5:[5]
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.
Solution 6:[6]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Tobiah Zarlez |
| Solution 3 | Kovi Nar |
| Solution 4 | Joe |
| Solution 5 | SAJJAN K |
| Solution 6 | Surbowl |
