SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Matt Ward

Adding a Service Reference

SharpDevelop 4.2 now includes support for adding references to WCF services.

Prerequisites

Microsoft Windows SDK should be installed.

In order to generate the service reference SharpDevelop uses Microsoft's ServiceModel Metadata Utility Tool SvcUtil which is included as part of the Microsoft Windows SDK.

Configuring SvcUtil Location

SharpDevelop should automatically detect where SvcUtil is installed however the path to SvcUtil can be overridden if required from the Tools - Options dialog.

SvcUtil path configuration in Tools Options

Adding a Service Reference

To add a service reference, open the Projects window, right click on the project or the references and select Add Service Reference.

Add service reference context menu

In the Add Service Reference dialog enter the url to the WCF service and click Go. The WCF service that is discovered should then be displayed.

Add service reference dialog

Clicking the Advanced button will allow you to configure further generation options.

Advanced service reference options

In the main Add Service Reference dialog enter a namespace for the service and then click the OK button to generate the service reference.

Generated service reference in projects window.

A service reference proxy will be added to the project and the project's app.config file will be updated with the WCF binding information.

Now you can use the WCF service in your application.

Published Apr 22 2012, 11:28 AM by MattWard
Filed under:

Comments

No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.