How to add a web service reference in Visual Studio 2015 to a console app

徘徊边缘 提交于 2019-12-01 17:27:46

问题


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


回答1:


Right click References -> Add Service Reference.

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




回答2:


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/



来源:https://stackoverflow.com/questions/31852448/how-to-add-a-web-service-reference-in-visual-studio-2015-to-a-console-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!