[英]error CS0012: The type 'TaskAwaiter<>' is defined in an assembly that is not referenced
When I try to debug my Windows Phone 8.1 project the Locals window is empty, and Watch shows an error for this
: 当我尝试调试我的Windows Phone 8.1的项目本地窗口是空的,并观看显示错误了
this
:
this error CS0012: The type 'TaskAwaiter<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Everything else seems to work just fine, there are no errors/warnings related to this, it happens only while debuging. 其他一切似乎都运行得很好,没有与此相关的错误/警告,只有在调试时才会发生。 And also not for all projects.
而且并非适用于所有项目。
I've tried a few fixes I found on Stack and MDSN, but: 我尝试过在Stack和MDSN上找到的一些修复,但是:
<CheckForSystemRuntimeDependency>true</CheckForSystemRuntimeDependency>
didn't change anything; <CheckForSystemRuntimeDependency>true</CheckForSystemRuntimeDependency>
没有改变任何东西; Is there anything else I can try? 还有什么我可以尝试的吗?
This is a known issue in Visual Studio 2015. 这是Visual Studio 2015中的已知问题。
Workaround: enable the legacy C# and VB expression evaluators. 解决方法:启用旧版C#和VB表达式计算器。 (You got that right.)
(你说对了。)
Tools > Options > Debugging > General > Use the legacy C# and VB expression evaluators 工具>选项>调试>常规>使用旧版C#和VB表达式计算器
Important: You cannot check the box during debugging! 重要提示:在调试期间无法选中此框!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.