【发布时间】:2013-10-17 09:44:35
【问题描述】:
我想在 C# 4.0 中使用 async/await 并且我已经安装了以下包:
http://www.nuget.org/packages/Microsoft.Bcl.Async/
问题是我没有可用的 async/await 关键字。
我正在使用带有 SP1 的 VS2010。
谢谢。
【问题讨论】:
-
这些关键字是 C# 5.0 中的新关键字。
-
你为什么要为此创建一个新问题?我已经解释了问题所在:Visual Studio 需要在语言级别上了解这一点。 VS2010 仅支持 C# 4,不支持 C# 5。要么您需要安装旧的 CTP(IMO 是个坏主意),要么使用 Visual Studio 2012 或 2013。
标签: c# async-await