none
Com error using file sync provider in c# express 2010 on Windows Forms project RRS feed

  • Question

  • I cannot get the file sync sample code to run when the project code is moved from a console app(It works in the console app) into a windows form app. I am using Visual c# express on a 64 bit windows 7 machine with the 64 bit version of the sync framework version 2.1. I think it may be due to the fact that the target "Any Cpu" is set on console apps but not on Windows forms apps on Visual c# express 2010. I get a com error: 80040154 for component with CLSID {031913FE-EB2A-49F2-B2BE-B996B2448CD4} Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    I don't think you can change target platforms on c# express, if this is the issue what alternatives do I have ? (I see most people recommend changing the target platform but I am not sure if this is my problem since I don't see why the target platform would change in these 2 application types in visual c# express) 

     

    Monday, January 31, 2011 7:38 PM

All replies

  • Tuesday, February 1, 2011 2:45 PM
  • The File Synchronization Provider Sample was coded for Microsoft Sync Framwork Version 2.0.  In the VS project ckeck the reference preferences for Microsoft.Synchronization and Microsoft.Synchronization.Files and make sure that Specific Version is set to False.

    In addition, make sure that you either have the entire Microsoft Synchronization Framework SDK installed for x64, or both the Microsoft Synchronization

    If you have version 2.1 installed make sure you either have the entire SDK (Microsoft Synchronization Framework 2.1 SDK) installed, or both the Microsoft Synchronization 2.1 Core Components and the Microsoft Synchronization 2.1 Provider Services.

    The Any CPU setting should not be the problem, this will default to your computer's CPU which is x64.

     


    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Tuesday, February 1, 2011 6:37 PM
  • The File Synchronization Provider Sample was created for Microsoft Synchronization Framework v2.0.  You can still run it with v2.1, but make sure that in VS, both the Microsoft.Synchronization and Microsoft.Synchronization.Files reference properties have the 'Specific Version' value set to false.  

    In addition, you should either have the the Microsoft Synchronization Framework 2.1 SDK installed or both the Microsoft Synchronization Framework 2.1 Core Components and Microsoft Synchronization Framework 2.1 Provider Services (all 64 bit).

    The Any CPU target is not an issue.  Visual Studio will pick the references for your CPU architecture.

     


    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Tuesday, February 1, 2011 7:50 PM