{"id":6061,"date":"2015-12-15T16:23:00","date_gmt":"2015-12-15T16:23:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2015\/12\/15\/wcf-connected-service-visual-studio-extension-preview-for-asp-net-5-projects\/"},"modified":"2023-09-21T11:31:33","modified_gmt":"2023-09-21T18:31:33","slug":"wcf-connected-service-visual-studio-extension-preview-for-asp-net-5-projects","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/wcf-connected-service-visual-studio-extension-preview-for-asp-net-5-projects\/","title":{"rendered":"WCF Connected Service Visual Studio Extension Preview for ASP.NET 5 Projects"},"content":{"rendered":"<p>Over the years, many Visual Studio developers have enjoyed the productivity that <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/bb386382.aspx\"><span style=\"color: #0000ff\">Add Service Reference Dialog Box<\/span><\/a> provided when their projects need to access Windows Communication Foundation (WCF) services. WCF team is excited to introduce you to the support of Add Service Reference functionality for ASP.NET 5 projects via WCF Connected Service extension preview. This tool retrieves metadata from a WCF service in the current solution, locally or on a network and generates&nbsp;a .NET Core&nbsp;compatible source code file for a WCF client proxy that you can use to access the service.<\/p>\n<h3>How to install the extension<\/h3>\n<p><span>The WCF Connected Service extension can be installed on Visual Studio 2015 and it has following prerequisite. Please make sure you have prerequisites installed before installing the extension.<\/span><\/p>\n<ul>\n<li><a href=\"https:\/\/www.visualstudio.com\/news\/vs2015-update1-vs\"><span style=\"color: #0000ff;font-family: Calibri;font-size: small\">Visual Studio 2015 Update 1<\/span><\/a><\/li>\n<li><a href=\"https:\/\/docs.asp.net\/en\/latest\/getting-started\/installing-on-windows.html\"><span style=\"color: #0000ff;font-family: Calibri;font-size: small\">ASP.NET 5 RC1<\/span><\/a><span style=\"font-family: Calibri;font-size: small\"> (this will install the latest ASP.NET 5 runtime and tooling)<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: Calibri;font-size: small\">The extension is published into the Visual Studio Extensions Gallery and can be downloaded either from the official Visual Studio Extensions Gallery <\/span><a href=\"https:\/\/visualstudiogallery.msdn.microsoft.com\/c3b3666e-a928-4136-9346-22e30c949c08\"><span style=\"color: #0000ff;font-family: Calibri;font-size: small\">download page<\/span><\/a> <span style=\"font-family: Calibri;font-size: small\">or directly from Visual Studio via the &#8220;Extensions and Updates&#8221; dialog as shown below by simply searching for &#8220;WCF Connected Service&#8221;.<br \/><\/span><\/p>\n<p style=\"padding-left: 30px\"><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2015\/12\/8686.VS_.Extension.Search.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2015\/12\/8686.VS_.Extension.Search.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<h3>How to use the extension<\/h3>\n<p><span style=\"font-family: Calibri;font-size: small\">The WCF Connected Service extension is applicable to any projects created with project templates under <strong>Visual C# -&gt; Web<\/strong>. This includes <em>Console Application (Package)<\/em>, <em>Class Library (Package)<\/em> and all <em>ASP.NET 5<\/em> templates. I will use an ASP.NET 5 Web Application as an example and walk you through to add a reference to a WCF service to the project.<\/span><\/p>\n<ol>\n<li><span>In Solution Explorer, right-click the <strong>References <\/strong>of the project and then click <strong>Add Connected Service <\/strong>as shown below. <\/span><span>The <strong>Add Connected Service<\/strong> dialog box appears.<br \/><\/span>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2018\/10\/5226.Add.Connected.Service.Menu.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2015\/12\/5226.Add_.Connected.Service.Menu_.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<\/li>\n<li><span>In Add Connected Service dialog box, click <strong>Microsoft <\/strong>on the left column, then click <strong>WCF Service &#8211; Preview<\/strong> in the middle column and finally click <strong>Configure <\/strong>button. This will bring up <strong>Configure WCF Service Reference<\/strong> dialog box.<br \/><\/span>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2015\/12\/6457.Add_.Connected.Service.Dialog.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2015\/12\/6457.Add_.Connected.Service.Dialog.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<\/li>\n<li><span>You can either click the <strong>Discover <\/strong>button to initiate a search for services that are contained in the current solution or enter the URL for a service in the <strong>Address <\/strong>box and then click <strong>Go <\/strong>to search for the service hosted at the address.<br \/><\/span>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2015\/12\/2744.WCF_.Service.Reference.Dialog.1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2015\/12\/2744.WCF_.Service.Reference.Dialog.1.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p><span>The services that are found will be displayed in the <strong>Services <\/strong>box and you can select the one you want to use. You can also enter the namespace that you want to use for the reference in the <strong>Namespace <\/strong>box. Optionally, you can click through the <strong>Next <\/strong>button to make further configuration of <strong>DataType Options<\/strong> and <strong>Client Options<\/strong>.<\/span><\/li>\n<li><span>Click <strong>Finish <\/strong>when you done.<br \/><\/span>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2018\/10\/8712.Scaffolding.Code.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2015\/12\/8712.Scaffolding.Code_.png\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<\/li>\n<\/ol>\n<div><span>This will download metadata from the WCF service, generate a <em>reference.cs<\/em> file for the WCF client proxy, and add it to the project under Service References folder. The <em>project.json<\/em> file of the project will also be updated with WCF NuGet packages for your application to run on .NET Core or framework references for your application to run on full .NET Framework as appropriate. With this, you can create client proxy as you normally do and happy coding!<\/span><\/div>\n<h3><span>What&#8217;s next and feedback request<\/span><\/h3>\n<div><span>This is a <strong>preview <\/strong>of the tool. Some of the advanced features such as Reuse types in Referenced Assemblies, are still not supported in this release. We are working to bring in more features. In the meanwhile, we would love to hear your experience of using this tool, any feedback or issues you may see.<\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Over the years, many Visual Studio developers have enjoyed the productivity that Add Service Reference Dialog Box provided when their projects need to access Windows Communication Foundation (WCF) services. WCF team is excited to introduce you to the support of Add Service Reference functionality for ASP.NET 5 projects via WCF Connected Service extension preview. This [&hellip;]<\/p>\n","protected":false},"author":463,"featured_media":58792,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[30,7489,7491,7339],"class_list":["post-6061","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-announcement","tag-asp-net-5","tag-visual-studio-2015","tag-wcf"],"acf":[],"blog_post_summary":"<p>Over the years, many Visual Studio developers have enjoyed the productivity that Add Service Reference Dialog Box provided when their projects need to access Windows Communication Foundation (WCF) services. WCF team is excited to introduce you to the support of Add Service Reference functionality for ASP.NET 5 projects via WCF Connected Service extension preview. This [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/6061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/463"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=6061"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/6061\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=6061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=6061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=6061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}