I have a .NET application using .NET Framework 3.5, written in C#. The application is invoking delegates asynchronously using BeginInvoke. The application works fine when compiled using Visual Studio 2012 RC, but it freezes when compiled with Visual Studio 2010 SP1 (the main thread is stuck in WaitOne waiting for async delegates to complete, but they never execute).
While it is possible the bug is in wrongly designed synchronization, what I am surprised is why it works in VS 2012 and does not work in VS 2010, while I am targeting the same framework version in both.
How is multi-targeting implemented in Visual Studio for .NET? Should one expect the executable behaviour to be identical when targeting the same framework version, or is there some part (compiler front end or some part of runtime libraries), which depends on the Visual Studio version used?