.NET Framework 4.7.2 with MoreLINQ

649 views Asked by At

I am trying to update a large solution to .NET Framework 4.7.2 with VS2019. One of the problems with this solution is that it is a large plugin type architecture, where (for many reasons) I am not able to recompile and release the plugins to production with the updated shared set of libraries that the solution provides.

Normally this is OK, but we have to be very careful to ensure full backwards binary compatibility. When we recently upgraded to .NET 4.7.2, we started getting conflicting usage indicators between System.Linq and MoreLinq, generally on the .ToHashSet() extension that we commonly use. The problem is outlined somewhat on MoreLinq's github

I think the only way to correct this is to isolate MoreLINQs usage into a single DLL that I control, and once all plugins reference that DLL upgrade to 4.7.2, fixing the .ToHashSet() call in the common location at that time.

Does anyone know of a better/more efficient way to do this, without re-releasing all the plugins at once? Some kind of global redirect that I am not aware of?

1

There are 1 answers

1
debracey On

Evidently this just works. Installing the solutions common DLLs @ 4.7.2 alongside older plugins @ 4.5.2 worked fine, even though those plugins had compilation errors when compiling in Visual Studio against 4.7.2.

I'd be curious to know what internals are making this succeed. Does the system load multiple versions of .NET framework DLLs for the running process?