Migration from .NET CF 1 to .NET CF 2

D

Davide De Santis

Hi all!

I'm trying to migrate a Pocket PC application from .NET CF 1 to .NET CF 2.

But I get 2 errors:

1. All System.Data.SqlClient.* objects get underlined, and when I look at
the error, I see:

Reference required to assembly 'System, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac' containing the base class
'System.ComponentModel.Component'. Add one to your project.

The Problem is, that this base class, is not present on my computer, where I
installed the .NET CF 2 SDK.

Does anyone know this problem?

2. When I use message-boxes, I configure the properties like: ",
MsgBoxStyle.Information + MsgBoxStyle.OKOnly,". But since CF 2 I get an
error saying: "Implicit conversion from 'Integer' to
'Microsoft.VisualBasic.MsgBoxStyle'."
Did this change from CF 1 to CF 2?

I hope, someone can help :)

Thanks & Greetz

D. De Santis
 
Z

Zanna

Davide De Santis said:
2. When I use message-boxes, I configure the properties like: ",
MsgBoxStyle.Information + MsgBoxStyle.OKOnly,". But since CF 2 I get an
error saying: "Implicit conversion from 'Integer' to
'Microsoft.VisualBasic.MsgBoxStyle'."
Did this change from CF 1 to CF 2?

This was always this way: for binary "OR" you should use the Or keyword.

Probably in CF1 you are used to keep Option Strict Off, that *finally* is On
by default.
 
P

Peter Foot [MVP]

Check that you have the correct versions of the SqlClient assemblies
referenced. In v1.0 there was a System.Data.Common.dll assembly which was
used by this provider, in v2.0 this assembly has been merged into
System.Data and more closely matches the desktop. You may have an erroneous
reference to System.Data.Common which in turn references the v1.0 version of
System.dll

Peter
 
I

Ilya Tumanov [MS]

If this project has been upgraded from V1, please make sure all references
to CF V1 assemblies have been removed and replaced with CF V2 references.

Specifically, remove references to SQL CE 2.0 managed provider
(System.Data.SqlServerCe.dll version 1.0.5000.0) and System.Data.Common.dll.

Add reference to SQL Mobile 3.0 provider (System.Data.SqlServerCe.dll
version 3.0.3600.0).



In theory you may be able to create V2 application which would use SQL CE
2.0, but that's not officially supported and/or tested.

Running V1 applications which are using SQL CE 2.0 is supported/tested (SQL
CE 2.0 needs to be installed separately).


Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.



*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 

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