ExpressionParser icon indicating copy to clipboard operation
ExpressionParser copied to clipboard

ValueTuple and TargetFrameworks

Open jnyrup opened this issue 5 years ago • 0 comments

System.ValueTuple is a convenient way to group elements of data into an anonymous struct tuple. However the integration into the .Net Framework ecosystem has been full of bumps.

Since net47 ValueTuple has been part of the BCL. https://docs.microsoft.com/en-us/dotnet/api/system.valuetuple?view=netframework-4.7#applies-to

When having a library targeting net47 it will still pick the net40 target of ExpressionParser. https://nugettoolsdev.azurewebsites.net/4.3.0/get-nearest-framework?project=net472&package=netstandard1.0%0D%0Anetstandard2.0%0D%0Anet40

The version of System.ValueTuple.dll in the BCL has AssemblyVersion 4.0.2.0. The dll found in the 4.5.0 nuget package has AssemblyVersion 4.0.3.0. That leads us into the bindingRedirect hell.

A way to mitigate most of these issues could be to:

  • Only include System.ValueTuple for net40 and netstandard1.0
  • Downgrade from 4.5.0 -> 4.4.0
  • Add a net47 target framework.

jnyrup avatar Dec 30 '20 14:12 jnyrup