Search code examples
synchronizationmicrosoft-sync-framework

MS Sync Framework 2.1 Sync Configuration File Generation


I have created some convention based code that allows easy provisioning of MS Sync scopes while using EF6 code first during the seed process. Im hoping to put this out as an open source project.

The problem I am having is, now that I have my scopes and everything provisioned properly in the database, how can I create a sync config xml file so I can use the code gen in SyncSvcUtil to create WCF services?

Is there a way to sort of backtrack from the scope_info and scope_config tables in the database to create a config file? Or do I have to integrate the SyncSvcLib project into my project so I can roll my own config file generation (Im hoping to avoid this)?

Thanks for any info.


Solution

  • In the end, the solution for me was to essentially rewrite what the SyncSvcUtil was doing.

    If you go through the sync toolkit source code you can basically walk through the logic behind the wizard for the scope provisioning. I took a List and was able to loop and back through the logic to create the sync.config xml file. I could then pass this file into the SyncSvcUtil and create the WCF services. There were a few tricky spots becuase doing it this way meant I needed access to some of the private members set during construction. But doable. Wish there were an easier way but I'm assuming that this is not a popular subject.

    I cant really understand why the sync framework was dropped. But I aim to put out my code at some point soon and will update this post when I do.