Skip to content

Support transitive package dependency of referenced (non-packing) project #199

@khamza85

Description

@khamza85

Describe the Bug

Sorry if a similar question was submitted before. Couldn't find anything similar.

Packaging project Pkg with net472 TFM has a dependency on a project NetStandardLib with netstandard2.0 TFM. NetStandardLib has a package reference on say Serialize.Linq package. I'd like to use Pkg package from another net472 project and transitively depend on Serialize.Linq

Steps to Reproduce

NetStandardLib.zip

Run nugetize on Pkg. In the generated nuspec, I see

    <dependencies>
      <group targetFramework=".NETStandard2.0">
        <dependency id="Serialize.Linq" version="2.0.0" />
      </group>
      <group targetFramework=".NETFramework4.7.2" />
    </dependencies>

which makes Serialize.Linq package impossible to be transitive dependency if you refer Pkg package from another net472 project.

Expected Behavior

Not even sure. Maybe nuspec should be generated something like this:

    <dependencies>
      <group targetFramework=".NETStandard2.0">
        <dependency id="Serialize.Linq" version="2.0.0" />
      </group>
      <group targetFramework=".NETFramework4.7.2">
         <dependency id="Serialize.Linq" version="2.0.0" />
       </group>
    </dependencies>

Version Info

NuGetizer: v0.8.0

Additional Info

I'm okay with any proper alternative solution. The only walkaround I found is to change NetStandardLib TFM to net472 or multi-target it with net472 and netstandard2.0.

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