6

I have a problem where whenever I debug (F5) the Compact Framework app we're developing and VS starts deploying the projects it will always also deploy the SQL Compact 3.5 libraries.

The problem is very similar to Visual Studio 2008: Don't deploy SQL Server Compact 3.5 when debugging except for the fact that it's not happening on a Windows CE device, but rather the WM 6 emulator.

I've tried upping the Target Platform to WM 6.0 Professional and installing the required SQL Compact libraries manually but it made no difference.

What's interesting is that the issue in my case doesn't occur on any real devices, only on the emulator.

Update: It seems that the problem isn't emulator, but rather WM version specific. I'm getting the same issue on a WM 6 device. It doesn't occur on WM 5.

Community
  • 1
  • 1
Michał Drozdowicz
  • 1,232
  • 11
  • 30

3 Answers3

2

Have you seen this: http://silverfinn.net/blog/?p=91

ErikEJ
  • 40,951
  • 5
  • 75
  • 115
1

I have seen this issue before when the version I had for SQL Server Compact installed in the OS image of my device/emulator did not match the version I had with Visual Studio. There are several Service Packs available for SQL Server Compact, I would recommend installing the same in both sides, and making sure you are referencing the same version in all your assemblies.

yms
  • 10,361
  • 3
  • 38
  • 68
0

As Michal Drozdowicz pointed out in his comments, the solution is to check the references of the SQLServerCe Component in all projects. They all must point to one and the same version, which should correspond to the latest installed version on the computer you are debugging from. So fixing is should be as easy as replacing all references to the assembly by a reference to

%YourProgramFilesDir%\Microsoft SQL Server Compact Edition\v3.5\Devices\System.Data.SqlServerCe.dll

(The place where you've installed SQLServerCe.)

If this is fixed, you may also need to install the previously automatically deployed cab files once manually.

Christoph Meißner
  • 1,511
  • 2
  • 21
  • 40