I have a SQL Server CE database that works fine in dev, but when installed on the client has an issue.
You're right that the CE runtime has to be installed. And if you're using VS2010, you have to make sure that you install SP2 of the CE runtimes.
Even with that installed, I've run into this. In my case, I had a SQL Server CE instance acting as a local cache for a database using ADO.NET Synchronization Services. Is this your scenario?
I found that on test machines I got this error:
Workarounds for the condition included:
Running the application "as Administrator"; or
Configuring the application manifest to require Administrator credentials; or
Refactoring the application so that the .sdf file was located in an unprotected directory, such as C:\ProgramData[some subdirectory name] and modifying the connection string to point to that area; or
Relocating the entire application directory in a user space. For instance, in "Documents" or some similar space with full file access rights to the EXE and the .SDF file
Obviously, each of those options has its disadvantages.
I had the same problem.
Windows 7.
It was because the user was in a Domain and the permissions where granted to "Everyone" and failed.
It must be granted to %DOMAIN%/Everyone
regards