I started using the new tuple feature in c# 7.0 but I noticed that neither in the function that returns a tuple nor in its caller is possible to check the variable values in debug mode. Instead an exception is shown:
$exception error CS8182: Predefined type 'ValueTuple`2' must be a struct.
Is there a way to get rid of that glitch and debug normally?
It seems a bug that Microsoft has fixed but it will be available in a future update (2017) https://github.com/dotnet/roslyn/pull/16930
It is a bug in the current version of System.ValueTuple. To workaround it till MS releases the fix, downgrade the package version from 4.3.0 to a pre-release one.
来源:https://stackoverflow.com/questions/42856319/how-can-i-remove-exception-predefined-type-valuetuple2-must-be-a-struct-whe