有谁能够帮助我。
我正在尝试将我的 .net core 控制台应用程序发布到单个文件中。
我正在使用这个命令:
dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true
我期望它将创建一个文件。但仍然有dll文件:
clrcompression.dll
clrjit.dll
coreclr.dll
mscordaccore.dll
我该如何修复它?我已经搜索过,但结果是一样的
要捆绑本机库,您需要指定IncludeNativeLibrariesForSelfExtract
flag.
所以尝试运行这个dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true /p:IncludeNativeLibrariesForSelfExtract=true
See https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file#other-considerations
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)