Skip to main content
Home Forums Silverlight Programming Programming with .NET - General XML Schema Support
2 replies. Latest Post by wwhite on October 11, 2008.
(0)
josboogz
Member
13 points
25 Posts
08-18-2008 5:06 AM |
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 L...
All-Star
25052 points
2,747 Posts
08-20-2008 12:57 AM |
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.
wwhite
14 points
20 Posts
10-11-2008 11:17 AM |
Thanks Yi-Lun,
I think the tool that's referred to is the xsd utility that comes with .net 2.0Since this is a basic utility for dealing with xml, it would be nice if it's code was compatiblewith Silverlight. So far I've used the code just by removing the Attributes that weren'tdefined, since none of them seem critical to the operation of the code.