Question

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

Was it helpful?

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?

OTHER TIPS

For others who have this issue, sendasync is an extension in the namespace system.threading.tasks.dataflow so if you must use the import statements shown above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top