<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishSelfContained>true</PublishSelfContained>
</PropertyGroup>
</Project>
Run dotnet publish.
The output in ./bin/Release/net8.0/linux-x64/publish is self-contained, as expected. What's unexpected is that the build output in /bin/Release/net8.0/linux-x64 is also self-contained. This is true even if I add <SelfContained>false</SelfContained>.