Skip to content

dotnet pack uses project folder name instead of project name as dependency #5868

@fubar-coder

Description

@fubar-coder

Steps to reproduce

Project layout:

LibA/project.json
LibA/TestA.cs
LibB/project.json
LibB/TestB.cs

The project name for LibA is Test.LibA and for LibB, it's Test.LibB.
LibB has a dependency to LibA by its folder name LibA, because Test.LibA searches the NuGet sources for a package with this ID (which might cause trouble).

Expected behavior

After a dotnet pack, the dependency of Test.LibB must be Test.LibA.

Actual behavior

The dependency of Test.LibB is LibA, even though the project.json has a name element with Test.LibA as the projects name.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-rc2-002485)

Product Information:
 Version:     1.0.0-rc2-002485
 Commit Sha:  d3c65aee87

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions