System.Threading.Task无法正常工作 [英] System.Threading.Task Is not working

查看:264
本文介绍了System.Threading.Task无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

System.Threading.Tasks在我的项目中没有工作。我一直在尝试使用所有DLL认为这个错误

我搜索各种代码但我没有得到任何解决方案我正在使用Asp.net 2008(3.5)



这里显示的错误 -



名称空间'System.Threading'中不存在类型或命名空间名称'Tasks'(你错过了吗?汇编参考?)



请帮助我谢谢

System.Threading.Tasks is not Working in my project. I has been trying to use All DLL regarded This error
I Search various Code But I did Not get any Solution I am Using Asp.net 2008 (3.5)

Error show here -

The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?)

so help me thanks

推荐答案

添加了System.Threading.Tasks命名空间在.NET 4.0版本中,因此它不适用于您所针对的.NET版本(3.5)。



升级到.NET 4或更高版本,或者更改代码以使用可用的线程模型。
The System.Threading.Tasks namespace was added at .NET version 4.0, so it is not available to the version of .NET you are targeting (3.5).

Either upgrade to .NET 4 or above, or change your code to use a threading model that is available.


在项目浏览器中,右键单击引用目录 - >添加引用,并选择System.Threading.Tasks作为参考。

然后您将能够访问该库中定义的对象。
In your project explorer, right click the 'References' directory -> Add reference, and select "System.Threading.Tasks" as a reference.
You then will be able to acces objects defined in that library.


这篇关于System.Threading.Task无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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