none
Unable to load DLL 'sqlceme35.dll' - Vista 32 bit

    Question

  • The full message is "Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

    Various forums deal with this error and all solutions that I have seen say you should change the "Any CPU" to "x86" configuration because of a problem on 64 bit Windows systems.

    But I am using a 32 bit Vista Home Premium system. I have MS Visual Studio Professional Edition (Education). Shortly after seeing the above message, VS
    typically crashes and restarts.

    I have a "Microsoft SQL Server Compact Edition" folder in "C:\Program Files\" and of course
    sqlceme35.dll is present in the \v3.5\ folder.

    Any clues?
    Tuesday, June 24, 2008 1:18 PM

All replies

  • Hi,

     

        Could you tell me what are the various dlls loaded at the time of error reporting, in the VS debug process. Also, see, from where is System.Data.SqlServerCe.dll is being loaded. And also, what do you mean by that you have the "MS SQL Server Compact Edition" folder, did you install v3.5 runtime? Is the installation smooth? I am asking because, there are some DLLs which need to be registered using regsvr32, and, this is done only when installing, manual copy will not be enough. I would also suggest, uninstall and re-install of all SQL Compact components, to make sure install is clean. Please let me know, if it still does not solve the problem.

     

    Thanks

    Udaya

    Thursday, June 26, 2008 10:01 AM
  • Thanks for replying.

    > I am using a 32 bit Vista Home Premium system. I have MS Visual Studio
    > Professional Edition (Education). Shortly after seeing the above
    > message, VS typically crashes and restarts.
    >
    > I have a "Microsoft SQL Server Compact Edition" folder in "C:\Program
    > Files\" and of course sqlceme35.dll is present in the \v3.5\ folder.

    I installed the Visual  Studio 2008 off the supplied DVD, checking C# and SQL Server Compact Edition 3.5 for installation. The installation was smooth. I did not install SQL Server 2005 or VB .NET, which are both in the supplied package.

    I have not touched any component in the Program Files folder.

    I am unable to see what dlls are loaded when reproducing this error, because the Visual Studio IDE crashes and restarts before I can do anything.




    Saturday, June 28, 2008 8:23 AM
  • I have cured this problem by downloading and running SSCERuntime-ENU.msi to repair MS SQL Server Compact Edition 3.5 as previously installed from the Visual Studio Professional - Education DVD.

    I think  this DVD did not install/register all components because System.Data.SqlServerCe was not available as a .NET Framework reference. Now it is.
    Saturday, June 28, 2008 3:11 PM
  • I am having the same problem. Here's my setup:

    Development
    I am using VS 2008 Pro, Visual Basic .Net and SQL CE 3.5.1 on Windows 7 Pro 32 bits.

    Deployment
    ClickOnce

    If I try to install in Windows 7 Ultimate 64 bits, the application installs ok, but as soon as it is opened, it shows the error message "Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)".

    I tried changing target CPU (original was anycpu, I tried with both x86 and x64) and got the same error message.

    I tried using both links launch and Install in the installation web page and both produced the error mesage (even though I have installed all prerequisites in my 64 bits Windows 7 Ultimate, I decided to try Install). When I selected Install, the setup.exe program installed an instance of SQL CE.

    I noticed that copying the solution folder to a laptop running windows 7 pro 64 bits and Visual Basic 2008 Express edition, produced the same error message while debugging inside the IDE.

    I tried installing to the developing PC (Windows 7 Pro 32 bits) and it worked ok, no error message.

    I tried installing to a PC running Windows XP Pro 32 bits and it worked ok., no eror message.

    So the problem seems to be the 64 bits installation.

    Any Ideas?
    Thursday, November 26, 2009 4:54 AM
  • Assume you have seen this: http://blogs.msdn.com/stevelasker/archive/2008/10/22/privately-deploying-sql-server-compact-with-the-ado-net-entity-provider.aspx ?
    http://erikej.blogspot.com Erik Ejlskov Jensen - Please mark as answer, if this was it.
    Thursday, November 26, 2009 7:29 AM
    Moderator
  • Erick,

    Thank you for your post.

    I had not read the document you referenced. I followed your link, read it and followed the described procedure:

    1. Added to my app the four dll files for SQL CE 3.5.1 (32 and 64 bits) and configured them to be included for deployment.
    2. Modified my app.config file adding
      <system.data>
        <DbProviderFactories>
          <remove invariant="System.Data.SqlServerCe.3.5"></remove>
          <add name="Microsoft SQL Server Compact Data Provider"
               invariant="System.Data.SqlServerCe.3.5"
               description=".NET Framework Data Provider for Microsoft SQL Server Compact"
               type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
           />
        </DbProviderFactories>
      </system.data>
    3. Modified the Publish configuration, deleting SQL CE from the prerequisites.
    4. Published.

    When I tried to install in my windows 7 ultimate 64 bits from the publishing web page. When calling the app I got an error message. Following the error message and loaded assemblies info.

    I have to confess I am lost here, I have no experience whatsoever with clickonce.  Any help will be appreciated.


    ************** Exception Text **************
    Unspecified error [ sqlceqp35.dll ]


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    SAC
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Users/Sergio/AppData/Local/Apps/2.0/Q01YX7LX.G6Y/QQOD9NGV.LV2/sac...tion_a51790c53269de11_0001.0000_c649e8d8fdfda016/SAC.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 8.0.0.0
        Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Data.SqlServerCe
        Assembly Version: 3.5.1.0
        Win32 Version: 3.5.5692.0
        CodeBase: file:///C:/Users/Sergio/AppData/Local/Apps/2.0/Q01YX7LX.G6Y/QQOD9NGV.LV2/sac...tion_a51790c53269de11_0001.0000_c649e8d8fdfda016/System.Data.SqlServerCe.DLL
    ----------------------------------------
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Transactions
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_64/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------

    Friday, November 27, 2009 2:30 AM
  • Kevin

    I realized the error message "Unspecified error [ sqlceqp35.dll ]" refers to a dll I was not including in the project.

    I added the dll along with the other four SQL CE dlls and I was able to install and run without problem my application.

    Thank you for your help!

    So, for me, the final solution is:

    1. Inside VS IDE, add to the app two folders named "x86" and "AMD64" (without the quotes).

    2. Copy into those folders five SQL CE 3.5.1 dll files and configure them in the project to be included for deployment.
       The x86 folder will contain the dlls 32 bits version and the AMD64 folder the dlls 64 bits version.
       The added files are:
         sqlcecompact35.dll
         sqlceme35.dll
         sqlceoledb35.dll
         sqlceqp35.dll
         sqlcese35.dll

    3. Modify the app.config file adding
      <system.data>
        <DbProviderFactories>
          <remove invariant="System.Data.SqlServerCe.3.5"></remove>
          <add name="Microsoft SQL Server Compact Data Provider"
               invariant="System.Data.SqlServerCe.3.5"
               description=".NET Framework Data Provider for Microsoft SQL Server Compact"
               type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
           />
        </DbProviderFactories>
      </system.data>

    4. Modify the Publish configuration, deleting SQL CE from the prerequisites.

    5. Publish.

    I hope this helps.
    • Proposed as answer by SergioTorres Friday, November 27, 2009 9:53 PM
    Friday, November 27, 2009 9:53 PM