【问题标题】:how do i build coreclr applications with dnx如何使用 dnx 构建 coreclr 应用程序
【发布时间】:2015-08-09 09:31:40
【问题描述】:

我已经按照我的 Mac 上的说明安装了 dnvm、coreclr:

http://docs.asp.net/en/latest/getting-started/installing-on-mac.html

如果我打电话给列表

peteisace$:    dnvm list

Active Version              Runtime Arch OperatingSystem Alias
------ -------              ------- ---- --------------- -----
       1.0.0-beta6          mono         linux/darwin    
   *   1.0.0-beta7-12302    coreclr x64  darwin          
       1.0.0-beta7-12302    mono         linux/darwin    default

所以似乎安装了 dnxcore50...

但是,如果我尝试恢复、构建、运行,在 coreclr 上没有任何反应;它与按 Enter 相同。没有尝试做任何事情:

peteisace$    dnu restore
peteisace$

如果我尝试构建/运行/任何命令,则相同:

peteisace$    dnx . run
peteisace$

如果我尝试使用单声道构建我的应用程序:

 peteisace$    dnvm use 1.0.0-beta7-12302 -r mono
 peteisace$    System.InvalidOperationException: The current runtime target framework is not compatible with 'sampleConsole'.

Current runtime target framework: 'DNX,Version=v4.5.1 (dnx451)'
 Version:      1.0.0-beta7-12302
 Type:         Mono
 Architecture: x64
 OS Name:      Darwin

欢迎提出任何建议。我不知道如何验证 coreclr 是否安装正确。运行时目录已填充:

$peteisace ls -l ~/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-beta7-12302/
/Users/peteisace/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-beta7-12302/:
total 8
drwxr-xr-x  108 peteisace  peteisace  3672 Aug  4 09:29 bin
-rw-r--r--    1 peteisace  peteisace   725 Aug  4 09:55 dnx-coreclr-darwin-x64.nuspec
drwxr-xr-x    3 peteisace  peteisace   102 Aug  4 09:29 package

【问题讨论】:

  • 完全相同的场景。我正在使用来自dotnet.github.io/core/getting-started 的示例代码。如果我做 dnx 。指向mono时运行,它执行,不需要先构建,但是像你一样,指向coreclr时没有响应。

标签: macos asp.net-core dnx dnvm coreclr


【解决方案1】:

您正在执行正确的命令。 Darwin/Linux CoreCLR 上的 dnx 仍然很糟糕。

当您在使用最新的 dnx 版本时遇到错误时,您可能会更幸运地联系到 dnx 团队,方法是在他们的 GitHub 存储库上提交问题。

DNX on GitHub

【讨论】:

    【解决方案2】:

    CoreCLR 上的 DNX 从 beta7 开始应该会更好。问题是从 8 月开始的,beta 7 是在 9 月 1 日左右发布的。您现在可以尝试同一链接中的说明吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-08
      • 1970-01-01
      • 2017-04-22
      • 2016-03-20
      • 2017-01-09
      • 2015-01-14
      • 2015-02-18
      • 2018-06-02
      相关资源
      最近更新 更多