【问题标题】:How to compile a Release configuration for Ubuntu console app .NET Core RC2如何为 Ubuntu 控制台应用程序 .NET Core RC2 编译发布配置
【发布时间】:2016-05-28 21:22:31
【问题描述】:

例如,hwapp 示例构建 Debug 但不构建 Release:

$ dotnet new
…
$ dotnet restore
…
$ dotnet build
…
$ dotnet ./bin/Debug/netcoreapp1.0/hwapp.dll
Hello World!

我必须在这个 project.json 中添加什么才能获得优化的构建?

{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true
  },
  "dependencies": {
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0-rc2-3002702"
    }
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  }
}

我最初的问题可能将两个不同的问题混为一谈——如何构建发布而不是调试?如何使用 .NET Native 进行构建?

我刚刚偶然发现an answer to the first question

$ dotnet build -c Release

这似乎提供了非常明显的性能提升。

【问题讨论】:

标签: ubuntu .net-core coreclr .net-native


【解决方案1】:

根据this native 编译已从dotnet 工具的最新版本中删除。

【讨论】:

    猜你喜欢
    • 2020-01-11
    • 2016-12-07
    • 2016-11-02
    • 1970-01-01
    • 2018-09-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-27
    相关资源
    最近更新 更多