如何删除异常“预定义类型'ValueTuple`2'必须是结构"调试的时候? [英] How can I remove exception "Predefined type 'ValueTuple`2' must be a struct" when debugging?
本文介绍了如何删除异常“预定义类型'ValueTuple`2'必须是结构"调试的时候?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始在 c# 7.0 中使用新的元组功能,但我注意到无论是在返回元组的函数中还是在其调用者中,都无法在调试模式下检查变量值.而是显示一个异常:
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?
推荐答案
这似乎是微软已经修复的一个错误,但它会在未来的更新中提供(2017 年)https://github.com/dotnet/roslyn/pull/16930
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
这篇关于如何删除异常“预定义类型'ValueTuple`2'必须是结构"调试的时候?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文