相关疑难解决方法(0)

哪里可以找到4.0的TPL数据流版本?

我正在寻找TPL数据流库的.NET 4.0版本.

Nuget包有一个4.0版本的库,但它似乎以.NET 4.5为目标.

我发现了4.0版本的各种引用,就像在这个论坛中一样:

http://social.msdn.microsoft.com/Forums/en-US/tpldataflow/thread/6206c714-6dee-4d17-a880-26d0c137a167

但是提到的链接只是将我重定向到库的Nuget页面.

有谁知道我在哪里可以找到一个针对.NET 4.0的工作版本?

.net .net-4.0 task-parallel-library nuget tpl-dataflow

11
推荐指数
1
解决办法
4323
查看次数

使用Async和Await进行异步编程

我正在阅读本教程,了解如何在c#中异步编程并遇到错误我不知道如何解决.这是链接:http://msdn.microsoft.com/en-us/library/hh191443.aspx,错误是:

Cannot find all types required by the 'async' modifier.  
Are you targeting the wrong framework version, or missing a reference to an assembly?   
Run Code Online (Sandbox Code Playgroud)

我的目标是.NET 4.0框架,并且不确定是否需要任何其他程序集.

这是代码:

public async Task<string> AccessTheWebAsync(Class1 class1, Class2 class2)
{
  // GetStringAsync returns a Task<string>. That means that when you await the 
  // task you'll get a List<string> (urlContents).
  Task<string[]> listTask = GetList(class1);

  // send message task

  // You can do work here that doesn't rely on the string from GetStringAsync. …
Run Code Online (Sandbox Code Playgroud)

c# .net-4.0 async-await c#-5.0 async-ctp

10
推荐指数
1
解决办法
2万
查看次数