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
The XML Schema included in the PDF document you linked has references to several other XSD files using the <import>
element. You will need to download these additional schema files and make sure that the path references in the <import>
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.
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!