Help - Referencing/Deploying SQLCE3.1 with VS2008


C

chris-s

I recently raised an issue here about how to upgrade my project to
VS2008 and retain SQL CE 3.1 rather than upgrade to 3.5. After
following what I believe are the correct steps it didn't work as
expected. I'll apologise for the length of the posting, but I wanted
to provide any information that may be relavant

It was suggested that I should upgrade the project and then simply
change the reference to the system.data.sqlserverce dll, all made
sense.

So, I followed these steps :

.. I installed the 'MS SQL Server 2005 Compact Edition Developer SDK'
for version 3.1

.. Changed the reference in the project to point to 'C:\Program Files
\Microsoft SQL Server Compact Edition\v3.1\SDK\bin
\wce500\System.Data.SqlServerCe.dll' that had just been installed.
Here is where I noticed something odd, VS displays a version number of
3.0.3600.0 against this reference, but file explorer displays it as
3.0.5300.0

.. Rebuilt the project and it's deployment project. The deployment
project excludes the sqlce dll's as expected

.. Taking the SQLCE cabs from the folder 'C:\Program Files\Microsoft
SQL Server Compact Edition\v3.1\SDK\bin\wce500\armv4i' that had just
been installed, I installed the following ones onto the device, a
Symbol MC35 running Windows Mobile 5...

sqlce30.dev.ENU.ppc.wce5.armv4i.CAB
sqlce30.ppc.wce5.armv4i.CAB
sqlce30.repl.ppc.wce5.armv41.CAB

.. I also installed our application from the cab file that had been
created by the deployment project as well as .NET2 that is not
installed by default.

On starting the application, it takes several minutes before
displaying an error screen with the following message...

'File or assembly name 'System.Data.SqlServerCE, Version=3.0.3600.0,
Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of it's
dependencies, was not found.'

I've googled this PKT reference and there is quite a bit about it
mainly suggesting the the desktop dll has been used by mistake, this
didn't really help me.

I looked at the filesystem on the device and could not find a copy of
the system.data.sqlserverce.dll in either the application folder or
the windows folder

The only files that appeared relevant to me were in the windows
folder...

sqlceca30.dll
sqlcecompact30.dll
sqceer30EN.dll
sqlceoledb30.dll
sqlceqp30.dll
sqlcese30.dll

I had expected to find a copy of system.data.sqlserverce.dll somewhere
but couldn't. So, taking the copy of this dll file from the folder 'C:
\Program Files\Microsoft SQL Server Compact Edition\v3.1\SDK\bin
\wce500' I copied it into the application folder and re-ran the
application.

This time it got a bit further, but I got a 'TypeLoadException'
followed by an error message 'Can't find PInvoke DLL 'sqlceme30.dll'.

So, back to the sdk files and I found and copied on the missing dll,
re-ran the application and voila it works!!!

OK, so I got it to work, but why did I have to copy on these two dll's
manually, have I missed something somewhere else?

If you got this far, thanks for your patience any resonse would be
greatly appreciated.

Chris
 
Ad

Advertisements

G

Ginny Caughey [MVP]

Chris,

I'm guessing the problem is with the deployment cab since everything else
including the reference to c:\program files\Microsoft SQL Server Compact
Edition\v3.1\SDK\bin\wce500\System.Data.SqlServerCe.dll is the same as I'm
using for working projects that were upgraded from VS 2005. I use a Rapi app
that deploys my application and DLLs along with the data so I haven't tested
using a deployment project for SSC 3.1 using VS 2008. My Rapi app also
downloads sqlce30.wce5.armv4i.cab from the v3.1 directory tree as opposed to
copying the DLLs individually if that helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top