Akrem
Akrem

Reputation: 4652

Could not load file or assembly 'System.Data.SqlServerCe, Version 3.5.0.0

I have application use SDF file and I use System.Data.SqlServerCe, Version 3.5.0.0 I make it copy Local = true ; after make l'app in other PC without sql compact installation I got this error

Could not load file or assembly 'System.Data.SqlServerCe, Version 3.5.0.0

I tried Embed Interop Types but it not work with ce dll.

the file existe in application directry; and I know that it read from Programme file but I have to install sql compact in any Pc I have to use application into ?

Upvotes: 1

Views: 12664

Answers (3)

Mohamed
Mohamed

Reputation: 11

rename the user.config file located at C:\Users[USER_NAME\AppData\Local\Microsoft_Corporation\LandingPage.exe_StrongName_ryspccglaxmt4nhllj5z3thycltsvyyx\10.0.0.0 TO (USER.CONFIG.BAK)

Upvotes: 1

user1157131
user1157131

Reputation: 233

The dll needs to be registered as it wont work by just copying the dll in bin folder. You need to do the installation on 2nd pc as well or try including x64 and x86 binaries with your app.

Upvotes: 1

Oybek
Oybek

Reputation: 7243

I'd suggest you to check out the following answer: Sql Server CE 4 and EF 4.1 CF Win 64 bit deployment. It really helped me. It directs to another resource: http://erikej.blogspot.com/2011/02/using-sql-server-compact-40-with.html.

Using this approach you don't need to install the SQL Server CE runtime. All the runtime travels with your app as a part of it.

Upvotes: 1

Related Questions