How to disable automatic deployment of SQL Server Compact when debugging a CF.NET application?

I have a problem: when I debug (F5) the Compact Framework application we are developing and VS starts deploying projects, it will always deploy SQL Compact 3.5 libraries as well.

The problem is very similar to Visual Studio 2008: do not deploy SQL Server Compact 3.5 when debugging , except for the fact that this does not happen on a Windows CE device, but rather a WM 6 emulator.

I tried to upgrade the target platform to WM 6.0 Professional and manually install the necessary SQL Compact libraries, but that didn't make any difference.

Interestingly, the problem in my case does not occur on any real device, only on the emulator.

Update. It seems that the problem is not in the emulator, but rather in the version for WM. I get the same problem on a WM 6 device. This does not happen on WM 5.

+6
source share
3 answers
+2
source

I saw this problem before when the version that I had for SQL Server Compact installed on the OS image of my device / emulator did not match the version that I had with Visual Studio. Several service packs are available for SQL Server Compact, I would recommend installing them on both sides and making sure that you are referencing the same version in all your builds.

+1
source

As Mikhal Drozdovich noted in his comments, the solution is to check the SQLServerCe component references in all projects. All of them should point to the same version, which should correspond to the latest installed version on the computer from which you are debugging. Therefore, fixing should be as simple as replacing all assembly references with a reference to

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

(The place where you installed SQLServerCe.)

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

0
source

Source: https://habr.com/ru/post/891643/


All Articles