如何添加 Web 引用 Visual Studio 2012 [英] How to add a Web reference Visual Studio 2012

查看:20
本文介绍了如何添加 Web 引用 Visual Studio 2012的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Visual Studio 2012 中为我的项目添加 Web 引用?在 Visual Studio 2010 中,可以通过单击添加服务引用"对话框中的高级"按钮来实现,如本页所述:在 Visual Studio 2010 中添加 Web 引用

Is it possible to add a web reference to my project in Visual Studio 2012? In Visual Studio 2010 it was possible by clicking the "Advanced" button in the "Add Service Reference" dialog, as it is written on this page : Add Web Reference in Visual Studio 2010

但在 Visual Studio 2012 中,服务引用设置"中没有兼容性"部分,此对话框中也没有添加 Web 引用"按钮.我想使用 SOAP Web 服务,但只有当我将其添加为 Web 引用时它才能正常工作(在 .NET Framework 2.0 兼容模式下.如果我将其添加为通常的服务引用,则在使用此服务时会出现异常).

But in Visual Studio 2012 there is no section "Compatibility" in the "Service Reference Settings" and no "Add Web Reference" button in this dialog. I want to use SOAP web-service, but it works correctly only when I add it as Web Reference (in .NET Framework 2.0 compatibility mode. If I Add it as usual service reference I have an exception during using this service).

如何向我的项目添加旧式 Web 引用?
或者如何使用我的网络服务和新样式的服务引用?

How to add old-style web reference to my project?
Or how to use my web service with new style of service references?

谢谢

推荐答案

已解决.复选框始终生成消息合同"有帮助.谢谢大家.

Solved. CheckBox "Always generate message contracts" Helped. Thanks for all.

这篇关于如何添加 Web 引用 Visual Studio 2012的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆