1
我的csproj中有一個xsd文件,xsd.exe從中生成一個包裝cs文件。.xsd在xsd.exe生成的包裝類中的註釋
我想以某種方式評論xsd文件,註釋也被插入到生成的包裝類中,因此可以有效地使用VS intellisense。
這可能使用xsd.exe嗎?
我的csproj中有一個xsd文件,xsd.exe從中生成一個包裝cs文件。.xsd在xsd.exe生成的包裝類中的註釋
我想以某種方式評論xsd文件,註釋也被插入到生成的包裝類中,因此可以有效地使用VS intellisense。
這可能使用xsd.exe嗎?
顯然,這似乎是不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吐出包含在模式中的任何文件。
UPDATE
我會嘗試XsdDataContractImporter - 也許這提供從XSD架構在代碼生成更多的控制。