Skip to content

PublishSelfContained should not do a self-contained build #32277

@sbomer

Description

@sbomer
<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>.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions