错误CS0012:类型'TaskAwaiter<>'在未引用的程序定义 [英] error CS0012: The type 'TaskAwaiter<>' is defined in an assembly that is not referenced

查看:1816
本文介绍了错误CS0012:类型'TaskAwaiter<>'在未引用的程序定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试调试我的Windows Phone 8.1的项目本地窗口是空的,并观察显示了这个错误:

When I try to debug my Windows Phone 8.1 project the Locals window is empty, and Watch shows an error for 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.

我已经尝试了一些修正我对栈和MDSN发现,但:

I've tried a few fixes I found on Stack and MDSN, but:


  • 添加< CheckForSystemRuntimeDependency>真< / CheckForSystemRuntimeDependency> 没有任何改变;

  • 调试>选项>常规>使用传统的VB和C#的东西是灰色的。

  • Adding <CheckForSystemRuntimeDependency>true</CheckForSystemRuntimeDependency> didn't change anything;
  • Debug > Options > General > Use legacy VB and C# something is greyed out.

还有什么我能试试吗?

推荐答案

这是在Visual Studio 2015年的已知问题

This is a known issue in Visual Studio 2015.

解决方法:启用传统C#和VB表达评估。 (你说对了。)

Workaround: enable the legacy C# and VB expression evaluators. (You got that right.)

工具>选项>调试>常规>使用传统的C#和VB表达评估

重要提示:在你不能勾选调试

这篇关于错误CS0012:类型'TaskAwaiter&LT;&GT;'在未引用的程序定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆