I have created application which uses SQL Server CE 4.0 SP1. I tried using central deployment. So I added reference to System.Data.SqlServerCe.dll (of SQL Server CE 4.0 SP1 )using add reference in visual studio.
Then I tried running application in
On a windows XP PC having only .net 2.0 and SQL Server CE 4.0 SP1. But it didn't work and gave error like
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Then I tried on a PC with only .net 2.0 and SQL Server CE 4.0. It worked properly.
So how it does not work for SQL Server CE 4.0 SP1 even if I added System.Data.SqlServerCe.dll of SQL Server CE 4.0 SP1? What I am missing? Should i need to change anything in my code (.config) to target 4.0 SP1?
Copy local = truein referencing assembly properties - opewix