简体   繁体   中英

System.Data.SqlServerCe.dll SQL Server CE 3.5 reference missing after generating .exe file using InstallShield Limited Edition Project

I am using VS 2013 with InstallShield Limited Edition Project.

Everything is working fine in development environment where I have created reference to System.Data.SqlServerCe.dll

After I generate .exe file and install my application it is unable to find reference for SQL Server CE 3.5 thus automatically gets reference for SQL Server CE 4.0 and gave an error.

Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = \\?\\C:\\Users\\someuser\\AppData\\Local\\testapp\\testdb.sdf ]

I have tried going through " this " article on MSDN but I can't find any publish tab in properties of my project.

Furthermore I am deploying System.Data.SqlServerCe.dll and all 7 32bit version SQL Server CE 3.5 dlls with my setup.

sqlceca30.dll
sqlcecompact30.dll
sqlceer30en.dll
sqlceme30.dll
sqlceoledb30.dll
sqlceqp30.dll
sqlcese30.dll

No, the issue is that your database file is in 4.0 format. As you can see from the error message, the engine is trying to open a 3,5 file, but gets a 4,0 file instead. So your application is using the 3,5 engine.

The problem was when I was trying to deploy msi package using InstallShield it used different build setting(x64) than my current setting(x86) which was causing my application to get the reference of x64 Sql Server CE 4.0 files. So it was fixed by changing setting of singleimage compiling option.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM