我想在 4.0 中创建的项目中使用 async 关键字.
I would like to use the async keywords in a project that is created in 4.0.
如果我访问 nuget 网站并寻找async",我会得到很多结果,但主要是我得到了这个:
If I go to the nuget 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
两者的区别是什么?
推荐答案您想要 Microsoft.Bcl.Async 包.这是一个正确发布的、稳定的非 CTP 包.这也需要 VS2012,因为需要更新的编译器来理解 async 和 await.
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.
更多推荐
如何在 target.net 4.0 项目中使用异步关键字
发布评论