使用 SVCUTIL 生成数据合约代码时出现问题
当我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,所以我已经克服了这个错误。 (我现在得到更多,但这些是另一个问题)。
我在 VS2010 中打开 ws-addr.xsd 文件并查看警告列表。一位说:
所以我去了“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:
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