LightGBM icon indicating copy to clipboard operation
LightGBM copied to clipboard

LightGBM package targets don't apply when package is referenced transitively.

Open ericstj opened this issue 1 year ago • 1 comments

Description

The LightGBM package includes targets to warn the user when referencing on an unsupported architecture. Those targets will not be applied when the package is referenced transitively.

https://github.com/microsoft/LightGBM/blob/dd31208ab7a7aea86762830697b00666f843ded9/.nuget/create_nuget.py#L80

Reproducible example

lightGbmSample.zip

I would expect a warning here since this sample references LightGBM in an x86 app, but there is none since the targets only apply to the project that directly references LightGBM.

Environment info

LightGBM version or commit hash: 3.3.5

Additional Comments

I believe the fix here is to simply copy the props/targets into the buildTransitive folder. See https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets.

ericstj avatar Feb 27 '24 19:02 ericstj

@ericstj sorry for the delayed response.

We don't have much .NET experience here. Are you interested in submitting a fix?

jameslamb avatar May 01 '24 04:05 jameslamb