Search code examples
vb.nettask-parallel-library.net-4.5tpl-dataflow

'sendasync' is not a member of 'System.Threading.Tasks.DataFlow.BufferBlock'


I'm trying to run the Microsoft TPL DataFlow complete example at the bottom of 'How to: Write Messages to and Read Messages from a Dataflow Block' but the code will not compile as-is. I have pulled down the TPL DataFlow package (v 4.5.9) in NuGet, and the references appear to be working. But the SendAsync method doesn't appear to be valid. Do I need to do something special because it's an extension method?

All I get is

'sendasync' is not a member of 'System.Threading.Tasks.DataFlow.BufferBlock(Of Integer)'

Code Screenshot:

Code Screenshot

References:

enter image description here

NuGet Packages:

enter image description here


Solution

  • When I tried this, it worked just fine for me.

    Maybe it's not the actual error and you have some unrelated error in your solution. Have you confirmed that you don't have any other errors?