Is there anyway to get 'xsd.exe' to mark the class hierarchy it generates
with the [Serializable] attribute? I need to be able to serialize the class
hierarchy as both XML and a byte stream and I don't have the luxury of hand
editing the generated file (it is regenerated as part of my pre-build step,
because I makes quite a few changes during the initial stages of the
project). I don't want to have to copy the data to a special serializable
proxy, thats a total waste of effort and defeats the purpose of using
'xsd.exe' to generate my hierarchy anyway.
Anyone know of a work around for this?
Dino Chiesa [Microsoft] - 26 Oct 2004 17:16 GMT
sed.exe -
can edit a generated file from the command line or from a build step.
I do this all the time from within makefiles to tweak generated files.
> Is there anyway to get 'xsd.exe' to mark the class hierarchy it generates
> with the [Serializable] attribute? I need to be able to serialize the
[quoted text clipped - 9 lines]
>
> Anyone know of a work around for this?
Mujtaba Syed - 03 Nov 2004 21:24 GMT
Hi Matt:
Since you have converted a schema to a class definition using XSD.EXE, you
should use the XmlSerializer framework!
Thanks.
Mujtaba Syed.
> Is there anyway to get 'xsd.exe' to mark the class hierarchy it generates
> with the [Serializable] attribute? I need to be able to serialize the class
[quoted text clipped - 6 lines]
>
> Anyone know of a work around for this?