How to: Add the CrmDiscoveryService Web Reference: CRM Online
[Applies to: Microsoft Dynamics CRM 4.0]
The typical procedure to add a Web Reference to a Visual Studio project is shown in the following procedure. Due to an issue with accessing the Web service directly, you can use the Discovery Service WSDL located in the download package for the SDK. The CrmDiscoveryService.wsdl file is located in the folder SDK\WSDL. For more information about the SDK download, see Sample Code.
Alternatively, you can save the WSDL from Microsoft Dynamics CRM Online to your computer with the following steps:
- Open Internet Explorer and enter the following URL:
- In the File menu, click Save As.
- Name the file CrmDiscoveryService.wsdl and save it to an appropriate location on your computer.
To Add the Web Reference to your Visual Studio Project
- Create a C# or Visual Basic .NET project in Microsoft Visual Studio.
- In Solution Explorer, right-click References.
- Select Add Web Reference if you are using Visual Studio 2005. For Visual Studio 2008, select Add Service Reference, click Advanced, and then click Add Web Reference.
- In the URL field, enter the path to the CrmDiscoveryService.wsdl file:
- Click Go.
- Edit the Web reference name. This is the name that you will put in the Using statement in the source code. For this example, type CrmSdk.Discovery.
- Click Add Reference.
The Microsoft Dynamics CRM CrmDiscoveryService Web service namespace is now available to your project. In the project source code, add one of the following statements:
[Visual Basic .NET]
You can now refer to the classes and methods that are in this SDK.
© 2010 Microsoft Corporation. All rights reserved.