Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

XSD2 code generation failed

Đang mở
#11 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lệnh batch được cung cấp với INSPIRE_LU_PLANNED.zip và kiểm tra đường dẫn lỗi tại dòng 79 của Xsd2/XsdCodeGenerator.cs, được gọi từ dòng 131 của Xsd2/Program.cs. Kiểm tra cách các schema được liệt kê được tải và liệu dependency GML có được phân giải hay không. Được xem là hoàn tất khi xác nhận được invocation cần thiết hoặc ghi lại một fix có thể tái hiện, cho phép tạo các schema thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The execution of the command

"<PATH_TO_XSD2.exe>\Xsd2.exe" ^
INSPIRE_LU_PLANNED\BaseTypes.xsd ^
INSPIRE_LU_PLANNED\BaseTypes2.xsd ^
INSPIRE_LU_PLANNED\LandUseNomenclature.xsd ^
INSPIRE_LU_PLANNED\xlink\1.0.0\xlinks.xsd ^
INSPIRE_LU_PLANNED\gml\3.2.1\gml.xsd ^
INSPIRE_LU_PLANNED\gml\3.3\extdEncRule.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gmd\gmd.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gco\gco.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gmx\gmx.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gss\gss.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gts\gts.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gsr\gsr.xsd ^
INSPIRE_LU_PLANNED\Sonstiges\Addresses.xsd ^
INSPIRE_LU_PLANNED\Sonstiges\GeographicalNames.xsd ^
INSPIRE_LU_PLANNED\PlannedLandUse.xsd ^
@pause

within a batch file leads to the following error message:

C:\Daten\xxx\INSPIRE_LU_PLANNED\BaseTypes.xsd
C:\Daten\xxx\INSPIRE_LU_PLANNED\BaseTypes.cs
XSD2 code generation failed.
System.Xml.Schema.XmlSchemaException: Nicht definiertes 'complexType' 'http://www.opengis.net/gml/3.2:AbstractFeatureType' wird als Basis für die Erweiterung des komplexen Typs verwendet.
bei System.Xml.Schema.XmlSchemaSet.InternalValidationCallback(Object sender, ValidationEventArgs e)
bei System.Xml.Schema.BaseProcessor.SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)
bei System.Xml.Schema.Compiler.CompileComplexContentExtension(XmlSchemaComplexType complexType, XmlSchemaComplexContent complexContent, XmlSchemaComplexContentExtension complexExtension)
bei System.Xml.Schema.Compiler.CompileComplexType(XmlSchemaComplexType complexType)
bei System.Xml.Schema.Compiler.Compile()
bei System.Xml.Schema.Compiler.Execute(XmlSchemaSet schemaSet, SchemaInfo schemaCompiledInfo)
bei System.Xml.Schema.XmlSchemaSet.Compile()
bei System.Xml.Serialization.XmlSchemas.Compile(ValidationEventHandler handler, Boolean fullCompile)
bei Xsd2.XsdCodeGenerator.Generate(IList`1 schemas, TextWriter output) in C:\Users\xxx\Downloads\xsd2-master\Xsd2\XsdCodeGenerator.cs:Zeile 79.
bei Xsd2.Program.Main(String[] args) in C:\Users\xxx\Downloads\xsd2-master\Xsd2\Program.cs:Zeile 131.

That means there is a 'complexType' which is not defined and which is used as a base for the extension of the complex type.

The files I used above can be found here:

INSPIRE_LU_PLANNED.zip

Is this behaviour a bug or do I have to use other options of xsd2.exe to successfully generate C# or VB .NET classes from the xsd files?

Ngôn ngữ chính
C#
Star
36
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codaxy/xsd2

Tất cả issue của codaxy/xsd2

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.