none
Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies RRS feed

  • Question

  • Hello , I need help i this error with SQL Compact edition 4.0

    Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.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)

    it's from my website at shared hosting !!!


    --------------------- Best Regards.. Mohmamad Jawad
    Saturday, July 9, 2011 4:23 PM

Answers

  • Hi Mohamad,

    Could you please describe the senario how you got this error message?
    Generally you need to make sure you have updated any Project references to point to the 4.0 managed DLL which usually located at: C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Desktop (System.Data.SqlServerCe.dll). If your references are located in the application folder, then make sure all the dlls are copied and confirm the versions are the same. If the app.config file existed, check it . This file could redirect assembly references version at run time . Such like:

    <assemblyBinding xmlns="urnchemas-microsoft-com:asm.v1">
                <dependentAssembly>
                    <assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
                    <bindingRedirect oldVersion="0.0.0.0-9.0.242.0" newVersion="4.0.0.0"/>
                </dependentAssembly>
            </assemblyBinding>

    Please read this thread for more details.

    Hope this helps.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, July 11, 2011 8:00 AM