Re:.NET 7 is Available Today
by AtNightWeCode on Tuesday November 08, 2022 @06:12PM
(#33525551)
I know what it is. It is just broken. App A uses a .NET Standard lib B that needs lib C. Since the purpose of lib B is to be as compliant as possible it targets some .NET Standard 1.x. Lib C is used already by the app. And now, dependency hell.
[ Parent
| on HN ]
Binding redirects should solve that issue.
Re:.NET 7 is Available Today
by AtNightWeCode on Tuesday November 08, 2022 @06:34PM
(#33525723)
Sometimes. But most .NET devs don't even know what a binding redirect is. They will also break on a regular basis when packages are updated.
Edit: The bindings that is. Maybe the devs too.
I guess I am missing something, why does this cause dependency hell? I guess microsoft is basically recommending against targeting netstandard now anyways so there must be some problem with it. But I don't think I have run into any problems with the situation you described.
edit: Ok I see, it seems in that scenario loading the correct assembly is more difficult on dotnet framework and usually requires binding redirects to be specified. On dotnet core/.NET 5+ there are no issues though, which is why I haven't experienced this problem myself.
https://nickcraver.com/blog/2020/02/11/binding-redirects/#th...
Re:.NET 7 is Available Today
by AtNightWeCode on Tuesday November 08, 2022 @08:35PM
(#33526629)
It has never really worked between different .NET versions. Nothing new with .NET 5/6/7.
We pretty much banned .NET Standard for any in-house dev.