Skip to main content

Microsoft Silverlight

Answered Question XML Schema SupportRSS Feed

(0)

josboogz
josboogz

Member

Member

13 points

25 Posts

XML Schema Support

Hi All,

I am currently coding a Silverlight 2 application using VS 2008 and Silverlight 2 beta 2 tools. I have created classes from my own constructed XML Schema. The Auto-Generated class file does not compile; with the compiler stating that

The namespace 'SerializableAttribute' does not exist in the namespace 'System' and

The namespace 'DesignerCategoryAttribute' does not exist in the namespace 'System.ComponentModel'

Note:  My references have System.XML, System.XML.Serialization and system but not 'System' (captial S) and I am unable to add it with an error stating that 'System.dll; was not build against the silverlight runtime.

Can anyone help please?

 Josboogz

Yi-Lun Luo - MSFT
Yi-Lun L...

All-Star

All-Star

25052 points

2,747 Posts

Answered Question

Re: XML Schema Support

Hello, do you mean you have a custom tool that will generate code automatically? If so, please make sure the generated code is Silverlight compatible. For example, if it's a tool that will generate Windows Forms code, obviously it won't work in Silverlight. DesignerCategoryAttribute is a class for the Windows Forms designer. SerializableAttribute is also not supported in Silverlight. XmlSerializer doesn't require this attribute.

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.

wwhite
wwhite

Member

Member

14 points

20 Posts

Re: XML Schema Support

Thanks Yi-Lun,

I think the tool that's referred to is the xsd utility that comes with .net 2.0
Since this is a basic utility for dealing with xml, it would be nice if it's code was compatible
with Silverlight. So far I've used the code just by removing the Attributes that weren't
defined, since none of them seem critical to the operation of the code.

Bill White
http://erikwhite.com
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities