asp.net core发布后的dll文件可以合并不?

2019-09-10 14:45发布

问题:

现在是一堆散装的,能不能合并成类似于Java发布后一个jar或者war文件那种?

回答1:

可以

dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true

参考链接:

  • Publishing A Single EXE File In .NET Core 3.0
  • Making a tiny .NET Core 3.0 entirely self-contained single executable
  • Create a Trimmed Self-Contained Single Executable in .NET Core 3.0


回答2:

.NET Core 3.0 Preview 5 亮点之一:发布单文件可执行程序