Referencing Web Services with Visual Studio 2008
Sunday, October 21, 2007 at 02:40PM Since Visual Studio 2008 supports multi targeting of the framework version it is possible to use Visual Studio 2008 for doing CRM 4.0 development. If you are doing that and using a target framework of 3.0 or below the experience of adding a web reference for the CRM service or Metadata service are similar to what you would do in Visual Studio 2005.
If you’re using .NET 3.5 as the target framework when you right click on references and are looking for the “Add Web Reference” menu item you will be surprised to not find it. Instead you see a new “Add Service Reference” menu option. That’s because Visual Studio 2008 introduces a lot of new features one of which is improved tooling for managing and configuring WCF. Since the CRM web services are ASP.NET ASMX services you need to handle adding the reference a little different. The following example shows the Add Service dialog
If you were to proceed with the above dialog, it would work and add the reference but you would likely find yourself with a set of class proxy’s that don’t match any of the SDK documentation or examples. To add a Web Reference to the Web Service that CRM exposes you need to do a couple more steps – First Select the Advanced Button on the left of the dialog
At the bottom of the Advanced Settings dialog you will see a button for Add Web Reference by clicking on that button you will see a familiar page that allows you to add the reference the same way you did in Visual Studio 2005.
David Yack |
2 Comments | 
Reader Comments (2)