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
There are times when OmniSharp does not start up at all, in which case you can run a command to restart it. In VS Code, you can use the Ctrl+Shift+P keybinding to enter commands. After using that keybinding, type in "restart omnisharp" and press enter.
OmniSharp is a set of tooling, editor integrations and libraries that together create an ecosystem that allows you to have a great programming experience no matter what your editor and operating system of choice may be.
C# for Visual Studio Code (powered by OmniSharp) This extension provides the following features inside VS Code: Lightweight development tools for . NET Core.
To do so, you can double-click or tap on the . csproj file in Windows File Explorer, or choose Open a project in Visual Studio, browse to find the . csproj file, and select the file.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With