Skip to content

[Bug]: Specifying RuntimeIdentifier flattens package contents in output directory #12064

Open
@lostmsu

Description

@lostmsu

NuGet Product Used

dotnet.exe

Product Version

.NET SDK 6.0.400

Worked before?

No response

Impact

I'm unable to use this version

Repro Steps & Context

  1. Create a console .csproj
  2. Add the following reference:
<PackageReference Include="LostTech.TensorBoard.Python.runtime.win-x64" Version="2.10.0-CI-2022-08-28-15" />
  1. Add
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Platforms>x64</Platforms>
  1. Build

Expected: output directory should contain a subdirectory named native from the package with the contents of the package content tree structure preserved.

Actual: output directory get all the files from runtimes\win-x64\native directory of the package, without any directory structure (e.g. files are directly in the output directory, relative paths are not preserved).

Remarks

If RuntimeIdentifier is not supplied, the output directory gets runtimes\win-x64\native folder with the appropriate contents (e.g. relative file paths are preserved). However, I need the <RuntimeIdentifier> in order to be able to publish the project correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:ContentFilesPackageReference contentFiles folderPriority:3Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Style:PackageReferenceType:Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions