我如何使用异步关键字在项目targeting.net 4.0 [英] How can I use the async keywords in a project targeting.net 4.0

查看:126
本文介绍了我如何使用异步关键字在项目targeting.net 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用异步关键字是在.NET 4.0中创建的项目。

I would like to use the async keywords in a project that is created in .net 4.0.

如果我去nuget.org网站,我寻找异步,我很多成果,但主要是我得到这样的:

If I go to the nuget.org website and I look for "async", i many results, but mainly I get this:

的Visual Studio异步CTP(第3版,非官方)0.3.0

AsyncAwaitCTP 1.0.0

这是两者之间的区别是什么?

Which is the differences between both of them?

推荐答案

您想要的 Microsoft.Bcl.Async 包。这是一个正常释放,非CTP包,是稳定的。这也需要VS2012,因为更新的编译器是需要了解异步等待

You want the Microsoft.Bcl.Async package. That's a properly released, non-CTP package that is stable. This also requires VS2012 since an updated compiler is needed to understand async and await.

在理论上人们可以使用旧的工具从VS2010随着旧的CTP库,我强烈建议你不这样做 - 它有缺陷,安装本身是一击或错过

In theory one could use older tools from VS2010 along with the older CTP library, I'd strongly recommend that you don't - it has bugs and the installation itself is a hit-or-miss.

这篇关于我如何使用异步关键字在项目targeting.net 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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