Mic*_*eth 10 .net .net-core asp.net-core
我想将我的dotnet核心项目配置为单个可执行文件进行编译.
该项目类似于生成的项目dotnet new:
{
  "version": "1.0.0-*",
  "buildOptions": {
    "debugType": "portable",
    "emitEntryPoint": true
  },
  "dependencies": {},
  "frameworks": {
    "netcoreapp1.1": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "version": "1.1.0"
        }
      },
      "imports": "dnxcore50"
    }
  },
  "runtimes": {
     "win10-x64": {}
   }
}
我怎么能这样编译成一个program.exe?当我运行dotnet publish它时,将dll和program.exe放在发布文件夹中,但不会将它们组合在一起.
从 .Net Core 3 开始可以使用此功能,例如:
dotnet publish -r win10-x64 -p:PublishSingleFile=true
另请参阅https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#single-file-executables
| 归档时间: | 
 | 
| 查看次数: | 2972 次 | 
| 最近记录: |