none
Compile Error: defining Friend ds As System.Data.DataSet, compiler thinks it needs System.Xml reference

    Question

  •  

    This is a frustrating error, because I've been trying to convert a CF 1 project that uses Pocket Access and InTheHands's ADOCE library to a CF 2.0 VS 2005 project and as I resolved my final issues and had everything setup to build the project successfully for the first time, this error happened.

     

    Here's a trimmed version of the code in the Module1.vb file:

     

    Module Module1

     

    Friend ds As System.Data.DataSet

     

    End Module

     

    Here's the compile error:

     

    C:\Documents and Settings\Kirk\My Documents\Visual Studio 2005\Projects\WM5PPCv2\Module1.vb(145) : error BC30009: Reference required to assembly 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' containing the implemented interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your project.

     

    Compact Framework 2.0 doesn't have System.Xml.

     

    How can I get the compiler to use/recognize the System.Data.DataSet type for the ds variable?

     

    Anyone know the solution?

     

    This is a similar error: http://support.microsoft.com/kb/811588/en-us

     

    In the link above, as a solution it says:

    Manually comment out the serialization attributes in the generated client proxy class. This allows the .NET Compact Framework project to gain access to the DataSet in a typed manner. However, every time the Web reference is updated, you must modify all the affected changes because Visual Studio .NET overwrites the proxy class

     

    Where is the proxy class file, I'd happily comment out whatever attributes I need to to get this to compile.

    Note: This is not a web class, form, and the project doesn't use or hasn't added any web references (that I know of)

     

     

     

    Visual Studio Info

     

    Microsoft Visual Studio 2005
    Version 8.0.50727.762  (SP.050727-7600)
    Microsoft .NET Framework
    Version 2.0.50727 SP1

    Installed Edition: Standard

    Microsoft Visual Basic 2005   77633-235-1526025-41773
    Microsoft Visual Basic 2005

    Microsoft Visual C# 2005   77633-235-1526025-41773
    Microsoft Visual C# 2005

    Microsoft Visual C++ 2005   77633-235-1526025-41773
    Microsoft Visual C++ 2005

    Microsoft Visual J# 2005   77633-235-1526025-41773
    Microsoft Visual J# 2005

    Microsoft Visual Web Developer 2005   77633-235-1526025-41773
    Microsoft Visual Web Developer 2005

    Microsoft Web Application Projects 2005   77633-235-1526025-41773
    Microsoft Web Application Projects 2005
    Version 8.0.50727.762

    Microsoft Visual Studio 2005 Standard Edition - ENU Service Pack 1 (KB926601)  
    This service pack is for Microsoft Visual Studio 2005 Standard Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/926601

    Thursday, April 10, 2008 3:00 PM

Answers

  • Compact Framework sure has System.Xml.dll; please make sure to add reference to it.

    Also keep in mind Pocket Access AKA ADOCE is no longer supported starting WM 5.0. Consider using SQL CE instead.

     

    Thursday, April 10, 2008 6:05 PM
    Moderator

All replies

  • Compact Framework sure has System.Xml.dll; please make sure to add reference to it.

    Also keep in mind Pocket Access AKA ADOCE is no longer supported starting WM 5.0. Consider using SQL CE instead.

     

    Thursday, April 10, 2008 6:05 PM
    Moderator
  • That's true, I found it, although documentation eslewhere says otherwise.

     

    I was mixing up this error with a Package not found error in the deployment phase, which made me think xml wasn't available in pocket pc.

     

     

    Friday, April 11, 2008 1:30 PM
  •  No, documentation clearly states System.Xml is supported in all versions of NETCF.

     

    Friday, April 11, 2008 4:49 PM
    Moderator