none
Exception when run Sync Framework on 64-bit Windows 7 with VS 2010 RC RRS feed

  • Question

  • Got

    System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {DBFD020B-D830-4FBE-A927-566B1F57A17A} failed due to the following error: 80040154.. 

    When SqlMetadataStore.CreateStore is called. I checked Control Panel and saw both Sync Framework 1.0 and 2.0 are installed. I attempted to uninstall Sync Framework 1.0 but it said it VS 2010 RC was depending on it.

    The CLSID points to an interop wrapper at C:\Program Files\Microsoft Sync Framework\2.0\Runtime\x64\MetaStore2.dll, which is there.

     

    Anyone's seen this kind of problem before?

    Friday, March 26, 2010 7:49 AM

Answers

  • What you see in step 4 is by design.

    Sync SDK x64 installs the following:

    under %SystemDrive%\Program Files\Microsoft Sync Framework:

    • Synchronization Core Components (Synchronization2.dll, Microsoft.Synchronization.dll)
    • Provider Services Components (SimpleProviders2.dll etc).

    under %SystemDrive%\Program Files (x86 )\Microsoft SDKs\Microsoft Sync Framework\2.0\Runtime:

    • assemblies for all 3 processor architectures

    I'll try to repro your issue, but in the meantime can you please install Synchronization.MSI and ProviderServices.MSI (not the SDK) and see if this works for 64bit?

     

    Adrian

    Friday, April 2, 2010 5:46 AM
  • try changing the Platform target under Build on the Project properties.
    Friday, March 26, 2010 8:13 AM
    Moderator
  • Its possible the way you compiled it's looking for the x86 version - to make sure can you try installing the x86 version of the sync framework and trying again?
    Friday, March 26, 2010 5:24 PM
    Moderator
  • have you tried forcing it to copy the assembly to the output directory by setting Copy Local property of the reference?

     

    Saturday, March 27, 2010 5:14 AM
    Moderator
  • Which version (X86 or X64) of Sync Framework MSI have you tried for re-installation?  Are you saying you used X64 MSI but the X86 version assemblies got GAC-ed?

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, March 31, 2010 4:48 PM
    Answerer
  • To try to find out what assemblies got loaded... Try to start debugger and look under the Modules window. This will show you the list of components that were loaded for your application.

    This will give us a better Idea

     

    Thanks!

    Thursday, April 1, 2010 5:52 PM
  • Hi, Friendly Dog II.

    Can you please uninstall everything (SyncSDK, Synchronization.msi) and verify there are no assemblies left in the GAC.

    Also, as Sid suggested above, can you check if building everything on/for x86 works ?

     

    Adrian

    Thursday, April 1, 2010 5:59 PM

All replies

  • try changing the Platform target under Build on the Project properties.
    Friday, March 26, 2010 8:13 AM
    Moderator
  • Hi JuneT:

    Thank you for the reply. I tried to build everything under x64 platform but that didn't help. I checked my program list and I didn't find a "Sql Server Compact 3.5" in control panel, but I do have some Sql Server 2008 editions installed. I wonder if the Sync Framework installation decided to skip SQL Server Compact installation because newer version existed, but later on couldn't find correct version?

    Friday, March 26, 2010 5:02 PM
  • Its possible the way you compiled it's looking for the x86 version - to make sure can you try installing the x86 version of the sync framework and trying again?
    Friday, March 26, 2010 5:24 PM
    Moderator
  • I checked all dll references, they are all referencing to versions under c:\Program Files\Microsoft Sync Framework\2.0\Runtime\x64\ folder. And The "platform target" property is set to "x64". And the program works when I used default windows FileSyncProvider, which uses SQL Compact as metdata storage as well, doesn't it? The program failes only when I tried to call SqlMetadataStore.Create method
    Friday, March 26, 2010 10:18 PM
  • Some more finding. I used ListDll from systeminterals to examine the process and found that although project references point to c:\Program Files\Microsoft Sync Framework\2.0\Runtime\x64\ , but the versions of loaded dlls are from GAC and the original location is from c:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Runtime\x86 (I also have a x64 folder under the directory). This version I believe is installed by Visual Studio 2010 but I could be wrong though. So, I change all references to this x86 version and changed platform taget to x86 and still it didn't work...
    Friday, March 26, 2010 10:53 PM
  • have you tried forcing it to copy the assembly to the output directory by setting Copy Local property of the reference?

     

    Saturday, March 27, 2010 5:14 AM
    Moderator
  • Yes I tried but it did not help. I tried to uninstall Sync Framework SDK (x64) and reinstall it again. What's interesting that the x86-version assemblies are registered in GAC instead of x64-version assemblies after installation - is this by design?
    Monday, March 29, 2010 10:25 PM
  • Which version (X86 or X64) of Sync Framework MSI have you tried for re-installation?  Are you saying you used X64 MSI but the X86 version assemblies got GAC-ed?

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, March 31, 2010 4:48 PM
    Answerer
  • Exactly.
    Wednesday, March 31, 2010 6:39 PM
  • To try to find out what assemblies got loaded... Try to start debugger and look under the Modules window. This will show you the list of components that were loaded for your application.

    This will give us a better Idea

     

    Thanks!

    Thursday, April 1, 2010 5:52 PM
  • Hi, Friendly Dog II.

    Can you please uninstall everything (SyncSDK, Synchronization.msi) and verify there are no assemblies left in the GAC.

    Also, as Sid suggested above, can you check if building everything on/for x86 works ?

     

    Adrian

    Thursday, April 1, 2010 5:59 PM
  • OK. I tried again. And here's exactly what I've done:

    1. Go to Control Panel and uninstalled "Microsoft Sync Framework 2.0 SDK (x64) ENU"

    2. Checked GAC, there's no Microsoft.Syncrhonization.* assemblies

    3. Download and installed Sync Framework SDK from this URL: http://download.microsoft.com/download/7/1/F/71F9E595-457F-4BC3-A745-071FAF4C51E8/SyncSDK-v2.0-x64-ENU.msi

    4. Note: the SDK is installed to: c:\Program Files(x86)\Microsoft SDKs\Microsoft Sync Framework, although I'm using a 64-bit package. Under the folder assemblies for both x86 version and x64 version are installed under v2.0\Runtime folder.

    5. Check GAC, Microsoft.Syncrhonization.* assemblies are there, but they are x86 versions.

    So, our project is not involved yet here, just plain installation of Sync Framework. And btw yes the project works well on three x86 machines (XP and Windows 7) but fails on both of x64 machines (both Windows 7) we have.

    Thursday, April 1, 2010 7:24 PM
  • What you see in step 4 is by design.

    Sync SDK x64 installs the following:

    under %SystemDrive%\Program Files\Microsoft Sync Framework:

    • Synchronization Core Components (Synchronization2.dll, Microsoft.Synchronization.dll)
    • Provider Services Components (SimpleProviders2.dll etc).

    under %SystemDrive%\Program Files (x86 )\Microsoft SDKs\Microsoft Sync Framework\2.0\Runtime:

    • assemblies for all 3 processor architectures

    I'll try to repro your issue, but in the meantime can you please install Synchronization.MSI and ProviderServices.MSI (not the SDK) and see if this works for 64bit?

     

    Adrian

    Friday, April 2, 2010 5:46 AM
  • I also tried to build and package everything in x86 with all dlls copied locally. Then the installed solution worked on x64 machine. I think this is good enough for me for now... Thanks everyone for help!

    Saturday, April 3, 2010 12:00 AM