重庆熊猫 Loading

.NET打包应用设置成自包含

设置项目的配置文件

在项目的配置文件(.csproj文件)中加入RuntimeIdentifier节点,节点的内容为要打包进入最终程序的目标运行时。更多平台标识符,请看这里RIDs。

<PropertyGroup>
 <!-- 加入目标运行时标识 -->
 <RuntimeIdentifier>win-x86</RuntimeIdentifier>
</PropertyGroup>

打包程序

使用dotnet命令进行打包。

dotnet build --configuration Release --sc
posted @ 2022-04-16 19:27  重庆熊猫  阅读(123)  评论(0编辑  收藏  举报