+1 vote
by (8.6k 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
by (58.9k points)
selected by
 
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).

...