none
Microsoft Sync f/w --- Class Not registered

    Question

  • Hello friends,

    I am trying to get started with Microsoft Sync f/w and below is my first code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.Synchronization;
    using Microsoft.Synchronization.Files;
    namespace MsSync_BuultInProviders
    {
        class Program
        {
            private static Guid sourceReplicaID;
            private static Guid destinationReplicaID;
            static void Main(string[] args)
            {
                sourceReplicaID = Guid.NewGuid();
                destinationReplicaID = Guid.NewGuid();
                Synchronize();
            }
            private static void Synchronize()
            {
                FileSyncProvider sourceProvider = new FileSyncProvider(sourceReplicaID, @"C:\TestSync1");
                FileSyncProvider destinationProvider = new FileSyncProvider(destinationReplicaID, @"C:\TestSync2");
                SyncOrchestrator syncAgent = new SyncOrchestrator();
                syncAgent.LocalProvider = sourceProvider;
                syncAgent.RemoteProvider = destinationProvider;
                syncAgent.Synchronize();
            }
        }
    }


    C# Runtime Error:

    Unhandled Exception: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x8004

    I tried regasm (returned w/ warning saying nothing regitred -- looked like its alredy there )

    Please help ...

    Thanks,

    -Aarsh

    Sunday, June 09, 2013 9:54 PM

Answers