System and Microsoft dependencies versions for different TFM #386
Replies: 3 comments 1 reply
-
The fact that that major version of System.Text.Json (other other Microsoft packages as well) is "9" doesn't mean that developers HAVE to use net9.0. These dependencies support a very long list of frameworks as you can see below: So I'm really surprised that you had to install .net9 locally. Maybe there's a subtle problem that forced this upgrade on you that I am not aware of???? I am going to guess (I could be wrong, feel free to set me straight if you know something that I don't): the problem is probably not that you need .net9.0 on your machine and/or that your project needs to target .net9.0, I think the root problem is probably that your project specifically references System.Text.Json and Microsoft.Extension.Logging with a version that conflicts with the version referenced by ZoomNet. We have faced similar dependency version mismatch before: #304. This particular issue is not exactly similar to the problem you are facing because it was specific to the Azure environment but I think the root is the same: the environment is referencing a version of a NuGet package that conflicts with the version of the same package referenced by ZoomNet. One possible solution that I have never investigated, is that maybe it could be beneficial for ZoomNet to specify a range of acceptable versions for these Microsoft packages rather than an exact version number. For example: "System.Text.Json version 8.0 or greater" rather that "Only version 9.0 of System.Text.Json". This would probably eliminate the problem for developers who reference any version within the specified range but the problem would still exist for developers referencing a version outside of this "acceptable" range. The one downside of specifying a range of versions for a NuGet reference is that "NuGet Package Manager" in Visual Studio does not support version ranges which means that this range would get overwritten if I continue using Visual Studio's package manager to upgrade my references. I would have to be very careful how I upgrade my references in the future. Anyway, long story short: I will investigate the possibility of specifying version range for these references rather that a specific version number. If I create a beta version of ZoomNet with this solution sometime this week, would you have time to help me test it? Let me know what you think. |
Beta Was this translation helpful? Give feedback.
-
I just published a beta called |
Beta Was this translation helpful? Give feedback.
-
Version 0.87.0 has been released to Nuget.org |
Beta Was this translation helpful? Give feedback.
-
I'd like to discuss what is the correct way of specifying System and Microsoft dependencies for different TFM for ZoomNet library in nuspec.
Current (0.86.0) version contains .net 4.8, .net6, .net7 and .net Standard 2.1 TFMs in nuspec.
But all of them reference e.g. version 9.0.0 of System.Text.Json and Microsoft.Extensions.Logging.
Personally I struggled a bit to update ZoomNet 0.84.0 to 0.86.0 in our project that still targets .net8 - I had to install .net9 locally, update direct references for System.Text.Json and Microsoft.Extensions.Logging to 9.0.0 in our project (otherwise VS NuGet package manager refused to install ZoomNet 0.86.0 package).
Maybe specific .net versions in nuspec should not require System and Microsoft packages from higher .net versions?
I.e., .net6 should still allow to use System.Text.Json and Microsoft.Extensions.Logging version 6.0.0, .net7 should allow to use version 7.0.0.
It is probably a bit harder with .net 4.8 and .net standard 2.1, as they should not require to install specific .net at all, and use some version of System.Text.Json and Microsoft.Extensions.Logging that is available in .net 4.8 or .net standard 2.1.
I saw that you, @Jericho , considering to revamp supported TFM for ZoomNet library (e.g. remove .net6 and .net7). So please consider my concern as well -)
And thanks again for this project, it really simplified our code that extensively works with Zoom API.
Beta Was this translation helpful? Give feedback.
All reactions