使用 SVCUTIL 生成数据合约代码时出现问题

发布于 2024-10-10 19:01:52 字数 1474 浏览 4 评论 0原文

当我在 Visual Studio 命令提示符中运行以下命令时:

D:\Documents\DEV\SARPilot\Docs\eoschema\schema\OrderSchema>svcutil /t:code /language=C# *.wsdl *.xsd ..\ws-addressing\*.xsd ..\gml\3.1.1\base\*.xsd ..\ows\1.0.0\*.xsd ..\xlink\1.0.0\*.xsd ..\swe\sweCommon\0.0.0\*.xsd /out:MyServiceProxy.cs /config:MyServiceProxy.config

出现以下错误:

Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.1]
Copyright (c) Microsoft Corporation.  All rights reserved.

Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.1]
Copyright (c) Microsoft Corporation.  All rights reserved.

Error: Cannot read ..\ws-addressing\*.xsd.

    Cannot load file D:\Documents\DEV\SARPilot\Docs\eoschema\schema\ws-addressing\ws-addr.xsd as an Assembly. Check the FusionLogs
 for more Information.

    Could not load file or assembly 'file:///D:\Documents\DEV\SARPilot\Docs\eoschema\schema\ws-addressing\ws-addr.xsd' or one of i
ts dependencies. The module was expected to contain an assembly manifest.

If you would like more help, type "svcutil /?"

我正在使用以下架构文件: http://wiki.services.eoportal .org/tiki-download_wiki_attachment.php?attId=637&page=HMA-FO%20Deliverables

我怎样才能克服这个错误?

When i run the following command in the visual studio command prompt:

D:\Documents\DEV\SARPilot\Docs\eoschema\schema\OrderSchema>svcutil /t:code /language=C# *.wsdl *.xsd ..\ws-addressing\*.xsd ..\gml\3.1.1\base\*.xsd ..\ows\1.0.0\*.xsd ..\xlink\1.0.0\*.xsd ..\swe\sweCommon\0.0.0\*.xsd /out:MyServiceProxy.cs /config:MyServiceProxy.config

I get the following error:

Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.1]
Copyright (c) Microsoft Corporation.  All rights reserved.

Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.1]
Copyright (c) Microsoft Corporation.  All rights reserved.

Error: Cannot read ..\ws-addressing\*.xsd.

    Cannot load file D:\Documents\DEV\SARPilot\Docs\eoschema\schema\ws-addressing\ws-addr.xsd as an Assembly. Check the FusionLogs
 for more Information.

    Could not load file or assembly 'file:///D:\Documents\DEV\SARPilot\Docs\eoschema\schema\ws-addressing\ws-addr.xsd' or one of i
ts dependencies. The module was expected to contain an assembly manifest.

If you would like more help, type "svcutil /?"

I'm using the following schema files:
http://wiki.services.eoportal.org/tiki-download_wiki_attachment.php?attId=637&page=HMA-FO%20Deliverables

How can i get past this error?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海夜未眠 2024-10-17 19:01:52

好的,所以我已经克服了这个错误。 (我现在得到更多,但这些是另一个问题)。

我在 VS2010 中打开 ws-addr.xsd 文件并查看警告列表。一位说:

警告 105 XML 编辑器试图
将此 DTD 转换为 XSD,以便可以
提供验证和智能感知
当你打字时,但它不能
创建有效的 XSD 架构。也许
此 DTD 使用的结构不
映射到 XSD。你也许能够得到
有关该问题的更多信息
使用创建架构
命令。 D:\Documents\DEV\SARPilot\Docs\eoschema\schema\ws-addressing\ws-addr.xsd 3 11 D:...\schema\

所以我去了“http://www.w3.org/ 2005/08/addressing/ws-addr.xsd”并下载正确的并替换它。

我不再收到警告 105,也不再收到 svcutil 的“无法加载文件”错误

Okay, so i've gotten past this error. (i get more now, but those are for another question).

I opened the ws-addr.xsd file in VS2010 and looked down the warnings list. one said:

Warning 105 The XML editor tried to
convert this DTD to XSD so it can
provide validation and intellisense
while you type, but it could not
create a valid XSD schema. Perhaps
this DTD uses constructs that do not
map to XSD. You may be able to get
more information about the problem by
using the Create Schema
command. D:\Documents\DEV\SARPilot\Docs\eoschema\schema\ws-addressing\ws-addr.xsd 3 11 D:...\schema\

So i man went to "http://www.w3.org/2005/08/addressing/ws-addr.xsd" and downloaded the correct one and replaced it.

I no longer got the warning 105, and no longer get the "Could not load file" error with svcutil

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文