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

前端 未结 2 1494
轮回少年
轮回少年 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:12

    I had the same issue and this is how I solved it:

    1) Copied all the xsd files referenced in xsd targeted for code generation to the same location i.e. "C:\Projects\Project1\Documents\xsds\strucutre". 2) Mentioned all the referred xsd files while executing xsd.exe:

    C:\Projects\Project1\Documents\xsds\strucutre>"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\xsd" structure.xsd RefXsd1.xsd RefXsd2.xsd RefXsd3.xsd /c /o:C:\Projects\Project1\Documents\ClassStructure

    A c-sharp file, containing the entities mentioned in xsds, was generated under folder C:\Projects\Project1\Documents\ClassStructure.

    Hope this helps!

提交回复
热议问题