2016-01-16 163 views
5

TL 「無法解析coreclr」 路徑; DR在Ubuntu 14.04

我在http://dotnet.github.io/getting-started/文檔的Ubuntu 14.04以下。

當我運行dotnet run它輸出Could not resolve coreclr path它立即退出非零返回代碼,我不能在文檔中找到我應該做的事情。

更多細節

  • 事實上,意想不到的事情在這之前發生:即使我加入deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main我的消息來源,有沒有dotnet包。但是有一個dotnet-dev包,所以它是我實際安裝的這個包。

  • 當我運行dotnet new,dotnet restoredotnet compile時,一切似乎都沒問題。

  • 當我運行locate coreclr時,我發現了幾個匹配的文件。特別是有一個/usr/share/dotnet-dev/runtime/coreclr目錄,其中有幾個.dll.so。還有一個$HOME/.dnx/packages/runtime.ubuntu.14.04-x64.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23616/runtimes/ubuntu.14.04-x64/native/libcoreclr.so文件

+0

對於我現在的'dnx run'安裝後[this](http://dotnet.github.io/docs/getting-started/installing/installing-core-linux.html)指南是有意義的。但仍然得到完全相同的錯誤'dotnet run'或從'。/ bin/Debug'運行二進制文件。 – brutallord

回答

0

我面臨同樣的問題。 「dotnet」,「dotnet-nightly」和「dotnet-dev」都沒有開箱即用。

但是直接運行/usr/share/dotnet/bin/corerun就在對應的dll上工作。這不如dotnet run方便,但做這項工作。

爲了簡化我的生活,我增加了一個別名我.bash_rc

dotnet_run() { 
    if [ $# -lt 1 ] 
    then 
     app=${PWD##*/} 
    else 
     app=$1 
    fi 

    if [ ! -f $app ] 
    then 
     app=bin/Debug/dnxcore50/$app.dll 
    fi 

    echo "Running: $app" 
    /usr/share/dotnet-dev/bin/corerun $app 
} 

在我的電腦,dotnet newdotnet restoredotnet compiledotnet_run發揮預期。我沒有嘗試更復雜的程序。