Skip to content

Packing with Microsoft.Build.NoTargets doesn't put dependency under proper target framework group when reference other Microsoft.Build.NoTargets project #155

@denjmpr

Description

@denjmpr

Describe the Bug

Hi @kzu!
I want to create "Microsoft.Build.NoTargets" project which uses Library project as reference and another "Microsoft.Build.NoTargets" which uses another Library project and the first "Microsoft.Build.NoTargets" project as references.
In the generated package's nuspec file the first "Microsoft.Build.NoTargets" project should be in the proper target framework group dependency, but it is inside common group and target framework group dependency is empty:

<dependencies>
  <group>
    <dependency id="Common" version="1.0.0" />
  </group>
  <group targetFramework="net5.0" />
</dependencies>

Steps to Reproduce

  1. Open HierarchyTest.sln from attached file.
    HierarchyTest.zip
  2. Build HierarchyTest.sln solution with Visual Studio.
  3. Unzip the result Core.1.0.0.nupkg file.
  4. Open Core.nuspec file with some editor.
  5. Observe - the "Common" package is inside common group dependency and there is empty net5.0 target framework group.

Expected Behavior

The "Common" package is inside net5.0 target framework group dependency.

Version Info

NuGetizer 0.7.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions