当我尝试调试Windows Phone 8.1项目时,“本地”窗口为空,并且Watch出现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'.
其他一切似乎都正常,没有与此相关的错误/警告,仅在调试时才会发生。而且也不是针对所有项目。
我已经尝试了一些在Stack和MDSN上发现的修复程序,但是:
<CheckForSystemRuntimeDependency>true</CheckForSystemRuntimeDependency>
并没有改变任何东西。 还有什么我可以尝试的吗?
最佳答案
这是Visual Studio 2015中的一个已知问题。
解决方法:启用旧版C#和VB表达式评估器。 (你说对了。)
工具>选项>调试>常规>使用旧版C#和VB表达式评估器
重要提示:调试期间无法选中该框!
关于c# - 错误CS0012 : The type 'TaskAwaiter<>' is defined in an assembly that is not referenced,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32053129/