Convert Solution from vs2003 to vs2005

S

Scott Toney

After letting vs2005 convert my solution, I am getting 'Control' (i.e.
Panel, Listview etc) is ambiguous in the namespace 'System.Windows.Forms'.
Is there some simple solution for what I need to do?

thanks
Scott
 
S

Scott Toney

Probably be shorter for what aren't!
Advancedlist
Compact Controls Designer
CryptoTextCF
Microsoft.CompactFramework.Design
Microsoft.WindowsCE.Forms
OpenNETCF
OpenNETCF.CF.Windows.Forms
OpenNETCF.Drawing
PrinterCE.NetCF
QCChart2DNetCF
SmartGrid
System
System.CF.Drawing
System.CF.Windows.Forms
System.Data
System.Data.Common
System.Data.SqlServerCE
System.Drawing
System.Windows.Forms
System.Windows.Forms.Datagrid
 
T

Tim Wilson

I would assume that the System.CF.Windows.Forms is causing the problem.
Unless there's some specific reason that you need them referenced, you
should be able to remove the following references...

System.CF.Drawing
System.CF.Windows.Forms
 
S

Scott Toney

That helped a bunch thanks,
Now I am getting a Cannot resolve dependency to assembly 'System,
Version=1.0.5000.0, culture=neutral ........
Any chance you know about that one?
 
T

Tim Wilson

Sounds like your references are messed up. You may want to remove all the
references and add them back just to make sure that the ones that are
specified in the project are for the proper framework (desktop/device) and
version. So remove all the System* assemblies in the project and then add
them back.
 
S

Scott Toney

Thanks for all the help, but I am still getting the same after removing and
readding the System* references.
 
S

Scott Toney

Sorry, I hit enter while doing some more testing. Re-adding the System*
references took care of that problem. Now, I move on to "Import of type
'System.Data.Common.DbConnection from assembly or module 'System.Data'
Failed."
I got this and then added System.Data.Common to the references and it is
still there.
 
R

Rick

I suspect that you are referencing the full framework data objects.
There is no system.data.common available in the CF.
 
T

Tim Wilson

The "System.Data.Common.DbConnection" class is defined in the
System.Data.dll assembly. So you'll need to ensure that the proper version
of this assembly is referenced. I assume that you're attempting to target CF
2.0?
 
S

Scott Toney

Yes, targeting CF 2.0, after removing the system.data.common reference, it
says:
Error 82 Import of type 'System.Data.Common.DbConnection' from assembly or
module 'System.Data' failed.
 
S

Scott Toney

After further modifications, the error is coming at this line:
dim tConn As System.Data.SqlServerCe.SqlCeConnection
 
T

Tim Wilson

The "System.Data.SqlServerCe.SqlCeConnection" class is defined in the
System.Data.SqlServerCe.dll assembly. Try adding a reference to this
assembly.
 
I

Ilya Tumanov [MS]

You're trying to use SQL CE 2.0 with NETCF V2 project which is not
supported.

Please remove all references to SQL CE 2.0 and replace them with references
to SQL Mobile (AKA SQL CE 3.0).

If you have existing SQL CE 2.0 databases, they would need to be converted
to SQL Mobile format.



If you interested why this is happening, several classes like
System.Data.Common.DbConnection were located in System.Data.Common.dll for
NETCF V1.

This DLL was removed in NETCF V2 and functionality moved to System.Data.dll
so it would match desktop. Runtime knows it needs to redirect from
System.Data.Common.dll to System.Data.dll.

However, compiler is unaware of that, so if you have both V2 System.Data.dll
and V1 System.Data.Common.dll references, you have duplicate classes and can't
compile.

If you remove System.Data.Common.dll reference, SQL CE 2.0 provider can't
find it and you can't compile again. Thus it's not supported.


--
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).
 
S

Scott Toney

Thanks. I've made sure that my SQL CE is pointing to version 3.0. As far as
the System.Data.Common.DbConnection, System.Data.Common.dbDataAdapter,
System.Data.Common.DbCommand etc, I can't find them in system data. My
system.data reference is version 1.0.5000.0, pointing at the system.data in
C:\Program Files\Microsoft Visual Studio
8\SmartDevices\SDK\CompactFramework\2.0\v1.0\WindowsCE\System.Data.dll
(which is the only place that I could find system.data).
 
S

Scott Toney

Along with the previous, am I going to have to change dbdataadapter into
idbdataadapter?
 

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