type or namespace Task could not be found

假如想象 提交于 2020-07-20 07:22:26

问题


I'm using Microsoft Visual Studio express for windows phone, when i use TASK in my app, i get the above mentioned error, even System.Threading.Tasks is also not found. What could be my problem??


回答1:


You need to target at least .NET Framework 4 in your project. You can change this under project properties.

Also, changing the target will not add the reference for the library, so you have to do this manually after changing the target framework.




回答2:


Right click on Task, choose Resolve > System.Threading.Tasks.Task




回答3:


On WP8 (test device Lumia 920), my problem is resolved by following the instructions at: http://www.nuget.org/packages/Microsoft.Bcl.Async



来源:https://stackoverflow.com/questions/19636990/type-or-namespace-task-could-not-be-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!