OmniSharp.Dnx.DnxPaths指定的运行时路径"default"不存在

che*_*xis 6 omnisharp asp.net-core

我正在尝试将OmniSharp与VisualStudio Code和ASP.NET 5(VNEXT)一起使用,但是当我尝试使用Omnisharp时,我遇到了这个问题:

[错误:OmniSharp.Dnx.DnxPaths]指定的运行时路径"default"不存在.搜索过的地点

我可以从命令行运行ASP.NET Web项目,我已经尝试将OmniSharpt与Sublime和Atom一起使用,但我遇到了同样的问题......

我已经逐步阅读了这个教程,除了这个问题之外一切正常......(我正在使用OSx El Capitan)

更多信息: https ://github.com/OmniSharp/omnisharp-roslyn/issues/347

有任何想法吗?

谢谢!!

小智 24

我安装了"1.0.0-rc1-final",几天前我一直在努力.无论出于何种原因我还不知道,运行时安装在/ usr/local/lib/dnx/runtimes中, 但是 Omnisharp正在查看〜/ .dnx/runtimes,它完全是空的.

我试图重新安装几次aspnet5核心,以及两个运行时(coreclr和mono).

我最终解决了这个问题(但我仍然不知道真正的问题是什么):

rmdir ~/.dnx/runtimes
ln -s /usr/local/lib/dnx/runtimes  ~/.dnx/runtimes
Run Code Online (Sandbox Code Playgroud)

之后,VSCode和Atom工作正常.

最好,

了Jonatan


che*_*xis 6

好的,我已经读过这个,它解决了我的问题:

似乎OmniSharp无法从全局安装的运行时读取.开箱即用的dnvm软件包安装会在全局位置安装运行时.

? 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
Run Code Online (Sandbox Code Playgroud)

您可以卸载全局位置中的符号链接,而不是符号链接,并在用户位置重新安装它们.

? dnvm uninstall 1.0.0-rc1-final -r coreclr
? dnvm uninstall 1.0.0-rc1-final -r mono
Run Code Online (Sandbox Code Playgroud)

然后将它们安装到用户位置.flag -g在全局安装它们btw.

? dnvm install latest -r coreclr
? dnvm install latest -r mono
Run Code Online (Sandbox Code Playgroud)

那会给你

? 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
Run Code Online (Sandbox Code Playgroud)

感谢GitHub的@danlofquist

一切都会按预期工作.