0

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
Has9
  • 41
  • 1
  • 7

2 Answers2

0

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.

ErikEJ
  • 40,951
  • 5
  • 75
  • 115
  • 1
    @ErikEJ Please elaborate as this is being flagged as a low-quality post. Skipping it for now. – bPratik Oct 01 '14 at 16:34
  • I know what error means, But it only exists after deploying application using .exe file and not when I run it using visual studio. So is there anything like generic referencing? or am I missing some extra references. – Has9 Oct 02 '14 at 09:15
  • I guess your project references the wrong version of System.data.SqlServerCe then – ErikEJ Oct 02 '14 at 09:40
0

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.

Has9
  • 41
  • 1
  • 7