Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove exception "Predefined type 'ValueTuple`2' must be a struct" when debugging?

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?

enter image description here

enter image description here

like image 201
Paolo Vigori Avatar asked Feb 05 '23 20:02

Paolo Vigori


1 Answers

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

like image 116
Paolo Vigori Avatar answered Feb 07 '23 10:02

Paolo Vigori