2
votes

I'm building a C# Winforms / .NET 3.5 / Visual Studio 2008 application that uses SQL Server Compact 3.5 SP1. After building a setup / msi project and deploying the app on a clean XP machine it works fine. However when I install it on a Vista 32 bit machine, I get the error below:

System.DllNotFoundException: Unable to load DLL 'sqlceme35.dll': The specified module could not be found

The app installs fine and the error happens when I run the .exe. In both cases the System.Data.SqlServerCe.dll file is in the application directory along with the exe. I've spent hours googling this trying to track down the problem. What I have found so far is that it's a known issue on Vista 64 bit, but I can't find anyone that has the issue on 32 bit Vista. After getting the problem on Vista I changed the target platform to x86 as people have suggested with the 64 bit problem, but tis didn't fix the issue. SQL Compact 3.5 is 32 bit so I don't see why this is happening on 32 bit Vista.

1
Did you get any error code with that? Something like 0x8007007E - Iain Hoult
And you include all the SQL Compact DLL files in your application directory? - ErikEJ
Iain - sorry for the delay getting back to you. The error code I get is 0x8007007E. Erik - I only include System.Data.SqlServerCe.dll. I read somewhere that this is the only dll needed. - Ciarán Bruen
Ok I think I found the problem which @ErikEJ was probably alluding to. I packaged the rest of the SQL CE dll files with the msi and installed them to the application folder, so this seems to work. - Ciarán Bruen

1 Answers

0
votes

Ok haven't had any official answer to this so gonna answer it myself, although @ErikEJ alluded to it in a comment. The problem was that I needed to package all the SQL CE dll files (listed below) and not just System.Data.SqlServerCe.dll. Once I did this the problem was sorted.

  • sqlceca35.dll
  • sqlcecompact35.dll
  • sqlceer35en.dll
  • sqlceoledb35.dll
  • sqlceqp35.dll
  • sqlcese35.dll