无法包含名称空间System.Threading.Tasks [英] Could not include namespace System.Threading.Tasks
问题描述
我无法在项目中包含System.Threading.Tasks.
I am unable to include System.Threading.Tasks in my project.
我正在使用Asp.net 2013(4.5)
I am Using Asp.net 2013 (4.5)
我收到以下错误-
名称空间"System.Threading"中不存在类型或名称空间名称"Tasks"(您是否缺少程序集引用?)
The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?)
我已经提到了先前的问题,他们建议在4.0或更高版本的ASP.NET中,它可以正常工作,但我很自然地将其包含在项目中.
I had refered earlier questions and they suggested in 4.0+ versions of ASP.NET it will work fine but I coudnt include it in my project.
谢谢我.
推荐答案
System.Threading.Tasks.Task
在mscorlib
中,而在.NET4.5
中.我的项目没有定位,因此在项目属性中需要将目标更改为4.5
.
System.Threading.Tasks.Task
is in mscorlib
which in .NET4.5
. My project is not targeting, so in project properties need to change the target to 4.5
.
这篇关于无法包含名称空间System.Threading.Tasks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!