dotnet publish -c Release -r <runtime identifier> -p:PublishSingleFile=true -r| implies --self-contained true. Add --self-contained false to publish as runtime-dependent.-r RID and -p:PublishSingleFile=true can be moved to .csproj as the following properties:but to target multiple RIDs, you have to use dotnet publish with the -r option for each RID.-p:IncludeNativeLibrariesForSelfExtract=true to include native libraries (like Common Language Runtime dlls) in the output executable.




dotnet publishare you... running an obfuscator
--runtime<runtime identifier>--self-containeddotnet publish -c Release -r <rid> --self-contained -p:PublishSingleFile=trueStartupObjectApplicationIconPlatformTargetPublishSingleFileRuntimeIdentifier<Exec Command="Obfuscar.Console.exe config.xml" />COMReference<ItemGroup>
<COMReference Include="WMPLib">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>0</VersionMinor>
<VersionMajor>1</VersionMajor>
<Guid>6bf52a50-394a-11d3-b153-00c04f79faa6</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
</ItemGroup>