我的 csproj 中有一个 xsd 文件,xsd.exe 从中生成一个包装器 cs 文件。
我想以某种方式评论 xsd 文件,评论也插入到生成的包装类中,因此可以有效地使用 VS intellisense。
这可以使用 xsd.exe 吗?
我的 csproj 中有一个 xsd 文件,xsd.exe 从中生成一个包装器 cs 文件。
我想以某种方式评论 xsd 文件,评论也插入到生成的包装类中,因此可以有效地使用 VS intellisense。
这可以使用 xsd.exe 吗?
显然,这似乎是不可能的 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 模式生成代码。