How to add a web service reference in Visual Studi

2019-02-22 08:26发布

Is there a way to easily add a web service reference to a Visual Studio 2015 console application?

2条回答
疯言疯语
2楼-- · 2019-02-22 08:30

Right click References -> Add Service Reference.

(i.e. don't right-click the Project name.)

查看更多
叛逆
3楼-- · 2019-02-22 08:35

If you don't have References -> Add Service Reference, you probably use VS2015 and new Console Applicaiton template, to add WCF service you need to:

  • Right click on References -> Add Connected Service
  • Click 'Find more services...' at the bottom of window.
  • Search for 'Visual Studio WCF Connected Service' and install
  • After VS restart, by clicking on 'Add Connected Service' you will be able to do what you wanted.

edit: Link to documentation of 'Visual Studio WCF Connected Service': https://blogs.msdn.microsoft.com/webdev/2015/12/15/wcf-connected-service-visual-studio-extension-preview-for-asp-net-5-projects/

查看更多
登录 后发表回答