Compartilhar via


Visual Studio 2008 and later

With Visual Studio 2008 and later, you have two options to connect to the legacy endpoint of the Dynamics GP service. You can either target the .NET Framework 2.0 or you can add a backward-compatible web reference.

Targeting the .NET Framework 2.0

In the properties of your Visual Studio project, you can choose .NET Framework 2.0 as the target framework.

When your project targets this version of the .NET Framework, it behaves just like a Visual Studio 2005 project. This means it can connect only to ASMX-based web services. You can connect to the legacy endpoint of the Dynamics GP service using the same procedure described in Visual Studio 2005.

Warning: Be aware that targeting the .NET Framework 2.0 prevents your application from accessing features available in the newer versions of the .NET Framework.

Adding a backward-compatible web reference

In Visual Studio 2008 and later, you can add a backward-compatible web reference to your Visual Studio project that connects to the legacy endpoint of the Dynamics GP service. The following procedure explains how to do this for a C# project.

  1. Choose to add a service reference.

    In the Project menu, choose Add Service Reference. The Add Service Reference window will be displayed.

  2. Display the advanced options.

    Click Advanced to display the Service Reference Settings.

  3. Choose to add a web reference.

    Click Add Web Reference to open the Add Web Reference window.

  4. Supply the URL for the legacy endpoint.

    Refer to Endpoint URLs to determine the URL to use. After the URL has been entered, click Go to search for the web service endpoint. When the web service is found, its information will be displayed.

  5. Name the web service reference.

    The web service will be referenced in your code, so it must be given a name. The Web reference name control provides a place to enter the name.

    Hint: Throughout this documentation, the web reference to the legacy endpoint of the Dynamics GP service is named "DynamicsGPService".

  6. Add the web reference.

    Click Add Reference to create the proxy for the web service.