Publish dotnet app in single file
When publish dotnet app to release many file appear in /Release folder. But if you don’t like it that way and love to compact those file in single file, it could be better. So define property like config below be useful to you.
1
2
3
4
5
6
7
8
9
10
11
12
13
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
</Project>
This post is licensed under CC BY 4.0 by the author.