using xsd.exe to generate c# files, getting error and warnings

前端 未结 2 1496
轮回少年
轮回少年 2020-12-29 04:47

This is the command i\'m running:

xsd.exe -c -l:c# D:\\Documents\\DEV\\SARPilot\\Docs\\schemas\\06-141r2\\06-141r2.xsd

These are the errors

2条回答
  •  轮回少年
    2020-12-29 05:10

    The XML Schema included in the PDF document you linked has references to several other XSD files using the element. You will need to download these additional schema files and make sure that the path references in the elements are pointing to the correct locations on your local computer.

    If you are still getting errors, it is because xsd.exe could not follow up on external references. To solve this issue, specify all the required XSD files directly on the command line as follows:

    xsd.exe /c MySchema.xsd Import01.xsd Import02.xsd Include01.xsd Include02.xsd

    where Import01.xsd, Import02.xsd, Include01.xsd and Include02.xsd are XSD files referenced via import and include elements in MySchema.xsd.

提交回复
热议问题