Old-style async methods missing in new version of Rebex components

+1 vote
asked Mar 21, 2016 by Rebex KB (8,430 points)

I just tried to move one of our projects to .net framework 4.0. The result was, that I got a lot of compilation errors with asynchronous functions like "Beginn Connect" and "EndConnect".

Can you please tell me, what I'm doing wrong?

1 Answer

0 votes
answered Mar 21, 2016 by Tomas Knopp (58,890 points)
selected Mar 21, 2016 by Rebex KB
Best answer

By default, .NET 4.0 assemblies only present a Task-based pattern (TAP) asynchronous API. Please include the Rebex.Legacy namespace in your program to make your existing code compile:

using Rebex.Legacy;

Rebex.Legacy namespace defines all the Begin/End methods as extension methods, making it possible to use to easily port your old code to newer versions of Rebex components on .NET 4.0 or higher.

This applies to versions since version 2012 R3 (build number 4700).