Skip to content

Publish path is incorrectly constructed when AppendRuntimeIdentifierToOutputPath is set #12114

Open
@pranavkm

Description

@pranavkm
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
  </PropertyGroup>

  <Target Name="Say">
    <Message Text="OutputPath: $(OutputPath)" Importance="High" />
    <Message Text="PublishDir: $(PublishDir)" Importance="High" />
  </Target>

</Project>

Expected:

OutputPath: bin\Debug\netcoreapp3.1\
PublishDir: bin\Debug\netcoreapp3.1\publish\

Actual:

OutputPath: bin\Debug\netcoreapp3.1\
PublishDir: bin\Debug\netcoreapp3.1\win-x64\publish\

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions