michielpost / Q42.HueApi

C# helper library to talk to the Philips Hue bridge
MIT License
411 stars 114 forks source link

Install in .net 4.6.2 project #123

Closed tgiachi closed 6 years ago

tgiachi commented 7 years ago

Why when i'm installing in .net 4.6.2. project, install everything of .net standard library?

michielpost commented 7 years ago

Yes, that's because Q42.HueApi targets .Net Standard. It's recommended to have a dependency on the NetStandard Metapackage. Also see: https://stackoverflow.com/questions/43995354/reducing-dependencies-for-a-net-standard-class-library

tgiachi commented 7 years ago

Ok thanks, @michielpost ! Is possibile to generate nuget package with target framework 4.5 leave only Json?

michielpost commented 7 years ago

No, I don't think so?

tgiachi commented 7 years ago

Ok, thank you anyway

leo60228 commented 5 years ago

@michielpost This issue is somewhat old, but this appears to be possible. Simply change

    <TargetFramework>netstandard2.0</TargetFramework>

in each .csproj to:

    <TargetFrameworks>netstandard2.0;net45</TargetFramework>

This is documented at https://docs.microsoft.com/en-us/dotnet/standard/frameworks#how-to-specify-target-frameworks. I'll submit a PR soon.

leo60228 commented 5 years ago

178