you got this error when call SyncOrchestrator.Synchronize() method.
This error is occurs when you are developing on x64 based machine.
The Possibilities of this error.
1- you are targeting x86 in the debug dropdown list, make sure it's x64
2- you are referencing the x86 Synchronization.dll make sure you are referencing the x64 which is located at
C:\Program Files\Microsoft Sync Framework\2.1\Runtime\x64\Synchronization.dll