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/