【发布时间】: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