VS2019 发布单文件

在项目.csproj文件下添加

<PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <PublishSingleFile>true</PublishSingleFile>
    <RuntimeIdentifier>linux-arm</RuntimeIdentifier>
</PropertyGroup>

RuntimeIdentifier 为发布的平台,必填

可以选择win-x64 win-x86 等等

选择项目右键发布,编辑配置 选择操作系统平台 发布

猜你喜欢

转载自www.cnblogs.com/microestc/p/11640947.html