使用XSD.exe生成C#帮助程序类:处理导入的模式失败

use*_*357 2 c# xml import xsd xsd.exe

我想使用XSD.exe工具(来自VS2008 SDK)从KML2.2 xml架构生成C#帮助文件.使用KML2.1,该工具工作正常.但是,KML2.2架构包含指向其他模式的导入标记,导致XSD.exe 崩溃.

这是我收到的错误消息:

C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Sample
s\Sdm> xsd.exe d:\temp\kml22.xsd /c /l:CS /n:Google.Kml22 /o:D:\temp\

Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.3038]
Copyright (C) Microsoft Corporation. All rights reserved.

Schema validation warning: The 'http://www.w3.org/2005/Atom:author' element is
 not declared. Line 311, position 12.
Schema validation warning: The 'http://www.w3.org/2005/Atom:link' element is not
 declared. Line 312, position 12.
Schema validation warning: The 'urn:oasis:names:tc:ciq:xsdschema:xAL:2.0:Address
Details' element is not declared. Line 314, position 12.

Warning: Schema could not be validated. Class generation may fail or may produce
 incorrect results.

Error: Error generating classes for schema 'd:\temp\kml22'.
  - The element 'http://www.w3.org/2005/Atom:author' is missing.
Run Code Online (Sandbox Code Playgroud)

您有什么建议我如何生成我的C#帮助文件?

R U*_*ben 6

您必须在命令行中指定所涉及的所有XSD,包括导入.是一篇带有示例的博客文章.