I am using sgen.exe to generate an XML serializer assembly.
The problem is that the tool is not working well for a Silverlight assembly.
Two problems:
- For some types, the tool does not succeed to generate the respective XML serializers. This issue exists only for the Silverlight assembly.
- The pr开发者_运维问答oduced assembly is not a Silverlight assembly. In fact, it references both versions of mscorlib - 2.0.5.0 and 4.0.0.0
I must add, that my types are plain DTO objects, no explicit constructors (hence the implicit public default one).
Each of the problems is enough to claim that sgen.exe is not supposed to be used on Silverlight assemblies.
So, what are the alternatives?
Thanks.
Use it in a regular project, and copy over the generated files. Or write the POCOs yourself (much cleaner, much prettier)
精彩评论