开发者

How to generate XML serializer assembly for a Silverlight assembly?

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:

  1. For some types, the tool does not succeed to generate the respective XML serializers. This issue exists only for the Silverlight assembly.
  2. 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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜