chemitaxis
chemitaxis

Reputation: 14907

OmniSharp.Dnx.DnxPaths The specified runtime path 'default' does not exist

I'm trying to use OmniSharp with VisualStudio Code and ASP.NET 5 (VNEXT), but when I try to use Omnisharp, I have this problem:

[ERROR:OmniSharp.Dnx.DnxPaths] The specified runtime path 'default' does not exist. Searched locations

I can run the ASP.NET web project from Command Line and I have tried to use OmniSharpt with Sublime and Atom, but I have the same problem...

I have read this tutorial step by step, and all works fine except this problem... (I'm using OSx El Capitan)

More info here: https://github.com/OmniSharp/omnisharp-roslyn/issues/347

Any ideas?

Thanks!!

Upvotes: 6

Views: 2188

Answers (2)

chemitaxis
chemitaxis

Reputation: 14907

Ok, I have read this and it solved my problem:

It seems like OmniSharp is unable to read from globally installed runtimes. Out of the box dnvm package installation installs the runtimes in the global location.

ᐅ dnvm list -detailed

Active              Version Runtime Architecture OperatingSystem Alias Location
------              ------- ------- ------------ --------------- ----- --------
            1.0.0-rc1-final coreclr          x64          darwin default /usr/local/lib/dnx/runtimes
            1.0.0-rc1-final    mono                    linux/osx       /usr/local/lib/dnx/runtimes

Instead of symlink you can uninstall the ones in the global location, and reinstall them in the user location.

ᐅ dnvm uninstall 1.0.0-rc1-final -r coreclr
ᐅ dnvm uninstall 1.0.0-rc1-final -r mono

and then install them to the user location. flag -g installs them globally btw.

ᐅ dnvm install latest -r coreclr
ᐅ dnvm install latest -r mono

That will give you

ᐅ dnvm list -detailed

Active              Version Runtime Architecture OperatingSystem Alias Location
------              ------- ------- ------------ --------------- ----- --------
     *      1.0.0-rc1-final coreclr          x64          darwin default ~/.dnx/runtimes
            1.0.0-rc1-final    mono                    linux/osx       ~/.dnx/runtimes

Thanks to @danlofquist from GitHub

and everything will work as intended.

Upvotes: 6

jonatan
jonatan

Reputation: 376

I installed "1.0.0-rc1-final" and I've been struggling with this few days ago. For whatever reason I don't know yet, the runtimes were installed in /usr/local/lib/dnx/runtimes, but Omnisharp was looking under ~/.dnx/runtimes, which was totally empty.

I've tried to reinstall several times aspnet5 core, and both runtimes (coreclr and mono).

I ended up solving it by doing this (but I still don't know what the real problem was):

rmdir ~/.dnx/runtimes
ln -s /usr/local/lib/dnx/runtimes  ~/.dnx/runtimes

Afterwards, VSCode and Atom are working fine.

Best,

Jonatan

Upvotes: 24

Related Questions