locked
Sync Framework Version Confusion RRS feed

  • Question

  • I am using the Sync Framework to provision and sync between an SQL Server Express database and a SQl Server Compact database.

    My code requires references to the following references:

    • Microsoft.Synchronization
    • Microsoft.Synchronization.Data
    • Microsoft.Synchronization.Data.SqlServer
    • Microsoft.Synchronization.Data.SqlServerCe

    Now, I believe that the latest releases if the Sync Framework are v1.1 and v2.1. According to my Programs & Features in Control Panel I have the following installed:

    ...and when I try to add references to the latest assemblies I see these listed as available in Visual Studio 2012:

    This has confused me. For the assemblies I require there isn;t a set I can select with matching numbers and since there is no Sync Framework v3.1 or v3.5 where are assembles designated as "3.1.0.0" and "3.5.0.0" coming from?

    So, I've ended up with the following:

    • Microsoft.Synchronization v2.1
    • Microsoft.Synchronization.Data v3.1
    • Microsoft.Synchronization.Data.SqlServer v3.1
    • Microsoft.Synchronization.Data.SqlServerCe v3.1

    I think this mix of version numbers is what is giving me the following error when I try to call SyncOrchestrator.Sync:

    Retrieving the COM class factory for component with CLSID {EC413D66-6221-4EBB-AC55-4900FB321011} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    Is this error down to version mismatch and what selection of versions can I use?

    TIA


    • Edited by Jυstin Tuesday, March 11, 2014 2:57 PM
    Tuesday, March 11, 2014 2:57 PM

Answers

  • check that the platform for Sync Fx (x86/x64) that you installed matches the target build platform for you project (x86/x64).

    i.e., if you use x86 Sync Fx, target build platform to x86

    • Marked as answer by Jυstin Wednesday, March 12, 2014 11:47 AM
    Tuesday, March 11, 2014 3:18 PM

All replies

  • check that the platform for Sync Fx (x86/x64) that you installed matches the target build platform for you project (x86/x64).

    i.e., if you use x86 Sync Fx, target build platform to x86

    • Marked as answer by Jυstin Wednesday, March 12, 2014 11:47 AM
    Tuesday, March 11, 2014 3:18 PM
  • Thanks for the reply.

    I installed the x64 version of the Microsoft Sync Framework 2.1 SDK and my project is an AnyCPU project. It was my understanding that this would default to an x64 project on an x64 OS but it didn't work until I explicitly set the Target CPU to x64. So it does run now.

    I still have no idea why I have such a mix of version numbers for Sync Framework v2.1.

    Tuesday, March 11, 2014 3:41 PM