SqlServerCe doesn't seem be supported in .net 4.0. But since I needed an embedded database in my application, I gathered all the necessary 3.5 dlls and included them so that my wpf application could use SqlServerCe as its embedded database.
The application works on my development machine, but now that I've created an installer, and am installing the application on other machines, I keep getting this exception on hose machines:
Unable to load DLL 'sqlceme35.dll': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
That dll is definitely included in directory where the application is installed. I've even tried copying all related SqlServerCE dlls to the System 32 folder. Nothing I've tried so far has resolved the problem.
Any suggestions?
I just recompiled an app I have that uses SQL Server CE 3.5.1 in .NET 4.0 and it works just fine. Here are a few things to check:
I resolved my problem by installing:
Microsoft SQL Server Compact 3.5 Service Pack 2 Beta 2 for Windows Desktop:
I solved the problem by installing the Microsoft Visual C++ 2008 Redistributable Package (x86)
In my case the Microsoft.VC90.CRT.manifest from \bin\amd64\Microsoft.VC90.CRT respectively \bin\x86\Microsoft.VC90.CRT was missing. When deploying your solution, it isn't part of the release by default but on some servers it seems to be necessary.
User contributions licensed under CC BY-SA 3.0