xsd.exe 生成的包装类中的 .xsd 注释

发布于 2024-08-20 13:50:25 字数 144 浏览 2 评论 0原文

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

我想以某种方式注释 xsd 文件,注释也会插入到生成的包装类中,以便可以有效地使用 VS intellisense。

使用 xsd.exe 可以吗?

I have an xsd file in my csproj, from which xsd.exe generates a wrapper cs file.

I'd like to comment the xsd file in a way, that the comments are also inserted into the generated wrapper class, so VS intellisense can be used effectively.

Is this possible using xsd.exe?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

儭儭莪哋寶赑 2024-08-27 13:50:25

显然这似乎不是 可以使用 xsd.exe

从 XML 架构文档生成源代码时,
Xsd.exe 忽略 元素及其内容。
对于 元素的父元素 也是如此。

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


更新

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

Apparently this seems to be not 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>.

I tried and I didn't find any way to force xsd.exe to spit out any documentation contained in the schema.


UPDATE

I will try out XsdDataContractImporter - maybe this offers more control over code generation from xsd schema.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文