如何在 target.net 4.0 项目中使用异步关键字

编程入门 行业动态 更新时间:2024-10-27 13:34:36
本文介绍了如何在 target 4.0 项目中使用异步关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在 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 项目中使用异步关键字

本文发布于:2023-11-12 02:58:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580311.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:关键字   项目   如何在   net   target

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!