michielpost / Q42.HueApi

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

Sub dependency installation #187

Closed fabianoriccardi closed 5 years ago

fabianoriccardi commented 5 years ago

Hi, this is more doubt and a curiosity: are those sub-dependency libraries really needed to be updated to their last version to correct usage of HueApi? I was wondering if libraries embedded by default in .NET framework were so unreliable to force the switch to the version provided by NuGet.

In particular, I refer to these libraries: Screenshot 2019-08-04 16 08 09

michielpost commented 5 years ago

I always try to keep the main dependencies up to date to the latest version. Updating the sub-dependencies shouldn't be necessary, but if there are updates, it's no problem to update. They might include bugfixes or security updates.

fabianoriccardi commented 5 years ago

Thank for answering! But my priority was to keep clean as much as possible the list of NuGet dependencies. I would prefer to use System.IO, System.Runtime, System.Net.Http and so on provided directly by my .NET version. Do you think it is possible?

michielpost commented 5 years ago

If you want to keep it as clean as possible, you should use a netstandard2.0 or .Net Core project. Then it doesn't need the System.Net.Http from NuGet.

But it looks lik you're using .Net4.7.2, it needs System.Net.Http which has additional dependencies by itself: https://www.nuget.org/packages/System.Net.Http/

But it looks like you can also use the System.Net.http provided by .Net, but it would need changes in the Q42.HueApi.csproj and can create other problems. I found a similar issue that discusses this problem here: https://github.com/IdentityModel/IdentityModel/issues/76