xmlserializer is not defined

N

netkev

I have the following in my vb.net smartdevice project in visual studio
2003(application is for a smartphone 2003 device):
Imports System.IO
Imports System.Xml.Serialization
Imports System.Xml
Imports System.Text
Dim s As New XmlSerializer(obj.GetType)

I have .net framework 1.1 with the .net framework sp1 patch
windows xp sp2

My error is on the last line and says "Type xmlserializer is not
defined". Anyone know why?

I think I need this because I generated a class using xsd.exe from an
xml schema I defined. Then I created a class instance, filled it with
data and now I want to write this xml object to a file(as xml) so that
I can later read it back.
 
H

Herfried K. Wagner [MVP]

I have the following in my vb.net smartdevice project in visual studio
2003(application is for a smartphone 2003 device):
Imports System.IO
Imports System.Xml.Serialization
Imports System.Xml
Imports System.Text
Dim s As New XmlSerializer(obj.GetType)

I have .net framework 1.1 with the .net framework sp1 patch
windows xp sp2

My error is on the last line and says "Type xmlserializer is not
defined".

Make sure your project contains a reference to "System.Xml.dll".
 
A

Armin Zingler

I have the following in my vb.net smartdevice project in visual
studio 2003(application is for a smartphone 2003 device):
Imports System.IO
Imports System.Xml.Serialization
Imports System.Xml
Imports System.Text
Dim s As New XmlSerializer(obj.GetType)

I have .net framework 1.1 with the .net framework sp1 patch
windows xp sp2

My error is on the last line and says "Type xmlserializer is not
defined". Anyone know why?

I think I need this because I generated a class using xsd.exe from
an xml schema I defined. Then I created a class instance, filled it
with data and now I want to write this xml object to a file(as xml)
so that I can later read it back.


Not supported in the compact framework. See the "plattforms:" hints at the
bottom of the docs on the class.

Armin
 
H

Herfried K. Wagner [MVP]

Errata:

Ooops. Ignore my message -- as Armin points out, 'XmlSerializer' is not
supported by the .NET Compact Framework.
 

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