SyncAgent setup RRS feed

  • Question

  • Hi,

    I'm new to this .Net development.

    I'm trying to write vb.net program using MSF for Folder Sync.

    I used the sample provided in the MSDN.

    I'm facing the problem...

    After adding references...

    Imports Microsoft.Synchronization

    Imports Microsoft.Synchronization.Files


    it shows the SyncAgent is not defined.


    if i include Microsoft.Synchronization.Data

    able to use the SyncAgent but

    Error in

    agent.LocalProvider = sourceProvider

    agent.RemoteProvider = destinationProvider


    Error 2 Value of type 'Microsoft.Synchronization.Files.FileSyncProvider' cannot be converted to 'Microsoft.Synchronization.SyncProvider'. 



    Dim sourceProvider As FileSyncProvider = Nothing

    Dim destinationProvider As FileSyncProvider = Nothing


    sourceProvider = New FileSyncProvider(CType(sourceReplicaId.GetGuidId, System.Guid), sourceReplicaRootPath, filter, options)

    destinationProvider = New FileSyncProvider(CType(destinationReplicaId.GetGuidId, System.Guid), destinationReplicaRootPath, filter, options)

    AddHandler destinationProvider.AppliedChange, AddressOf OnAppliedChange

    AddHandler destinationProvider.SkippedChange, AddressOf OnSkippedChange

    Dim agent As SyncAgent = New SyncAgent

    agent.LocalProvider = sourceProvider

    agent.RemoteProvider = destinationProvider

    • Moved by Max Wang_1983 Thursday, April 21, 2011 9:58 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Wednesday, August 6, 2008 10:09 AM


  • for this line: Dim agent As SyncAgent = New SyncAgent


    Please use SyncOrchestrator class in Microsoft.Synchronization namespace instead of the SyncAgent class in Microsoft.Synchronization.Data namespace to do the sync.




    Wednesday, August 6, 2008 5:50 PM