Answered SqlServerCe error...

  • Sunday, September 18, 2005 7:49 AM
     
     
    While executing this point of program:
    SqlCeConnection testConn = new SqlCeConnection();
    this exception occurs:

    ************** Exception Text **************
    System.IO.FileLoadException: Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' ---> System.IO.FileLoadException: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes'

    In .csproj file there are other data:
    Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3

    Building performs successfully.

    Help please...

All Replies

  • Monday, September 19, 2005 6:49 PM
     
     Answered
    Hi,
    From your stack trace, it is evident that your application was compiled against the NETCF and you are attempting to run it on the desktop. Running Sql Mobile applications on the desktop is not a supported scenario (except your desktop is a TabletPC).

    The public key token for System.Data.SqlServerCe (desktop platform) is 3be235df1c8d2ad3

    The public key token for System.Data.SqlServerCe (device platform) is 89845dcd8080cc91


    If you provide more info on exactly what you are trying to accomplish, I could provide you with some more info as to whether this is supported or not.


    Thanks.