Saturday, January 23, 2016

OmniSharp server is not running when taking Visual Studio Code for a spin in OS X

This happened to me when using Visual Studio Code in OS X. After typing Cmd + Shift + P and then dnx to Restore Packages, I got "OmniSharp server is not running".

This is most likely because your project.json file has errors. Open the Output console (Cmd + Shift + U) to get more information. Also, look at the errors in the Terminal when it opens. In my case the error was because of a comment in the project.json (using the double slash // which I had to remove). Another error I had was this line:

"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-update1"

which I had to change to:

"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final"