【问题标题】:.xsd comments in xsd.exe generated wrapper classxsd.exe 生成的包装类中的 .xsd 注释
【发布时间】:2011-01-14 17:26:39
【问题描述】:

我的 csproj 中有一个 xsd 文件,xsd.exe 从中生成一个包装器 cs 文件。

我想以某种方式评论 xsd 文件,即 cmets 也插入到生成的包装器类中,因此可以有效地使用 VS intellisense。

这可以使用 xsd.exe 吗?

【问题讨论】:

    标签: c# xsd code-generation xsd.exe


    【解决方案1】:

    显然这似乎不是possible with xsd.exe

    When generating source code from an XML Schema document, 
    Xsd.exe ignores the <appinfo> element and its contents. 
    The same is true for the parent of the <appinfo> element, <annotation>.
    

    我试过了,但没有找到任何方法来强制 xsd.exe 吐出架构中包含的任何文档。


    更新

    我会尝试XsdDataContractImporter - 也许这可以更好地控制从 xsd 模式生成代码。

    【讨论】:

      猜你喜欢
      • 2011-05-18
      • 1970-01-01
      • 2012-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多