locked
Sync Framework with WebServices RRS feed

  • Question

  • Error 2 The type 'Microsoft.Synchronization.SyncProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Synchronization, Version=0.94.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. D:\My Documents\Visual Studio 2008\Projects\ws1\WcfServiceAppln\WcfServiceAppln\Service.cs 19 72 WcfServiceAppln

     

    I have added reference to version 1.0.0.0 and 2.0.0.0 of Microsoft.Synchronization.Data.Server

     

    I get this error when I build my WebService

     

    using System;

    using System.Data;

    using System.Data.SqlClient;

    using System.Web;

    using System.Web.Services;

    using System.Web.Services.Protocols;

    using System.Collections.Generic;

    using System.Collections.ObjectModel;

    using Microsoft.Synchronization.Data;

    using Microsoft.Synchronization.Data.Server;

     

     

     

    [WebService(Namespace = "http://tempuri.org/")]

    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

    public class Service : System.Web.Services.WebService

    {

    private DbServerSyncProvider res = null;

    public Service()

    {

    }

    }

    • Moved by Hengzhe Li Friday, April 22, 2011 3:23 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, July 1, 2008 1:02 PM

Answers

  • Either V1 or V2 version should work, but if you reference V2 version of Microsoft.Synchronization.Data.Server.dll, please make sure you also reference the Microsoft.Synchronization.dll ( v1.0 of the sync framework) in your project.

     

    thanks

    Yunwen

    Thursday, July 17, 2008 1:20 AM
    Moderator

All replies

  • I have been having the same problem.  Did you ever resolve this issue?

     

    It was odd because a sample sync app I downloaded worked fine with what appeared to be the same reference to Microsoft.Synchronization.Data.  Then I recalled that when I went to add the sync reference to the project, I had to choose from one of two options: v1 or v2.  I had selected v2 so I went back and deleted the reference to v2 and added the reference to v1 and now I no longer get the error.

     

    I have not researched the difference between v1 and v2.  I wrongly assumed that v2 would be the latest and would be the one to work with the 2.0 framework but apparently that is incorrect?  I don't know.

    Tuesday, July 15, 2008 2:13 PM
  • Either V1 or V2 version should work, but if you reference V2 version of Microsoft.Synchronization.Data.Server.dll, please make sure you also reference the Microsoft.Synchronization.dll ( v1.0 of the sync framework) in your project.

     

    thanks

    Yunwen

    Thursday, July 17, 2008 1:20 AM
    Moderator
  • Note that we have augmented the documentation to explicitly call out the fact that this new assembly is required.  Hopefully this will help mitigate confusion in the future.

    Regards,

    Sean Kelley
    Program Manager
    Microsoft

     

     

     

    Thursday, April 23, 2009 9:56 PM
    Moderator