Sdílet prostřednictvím


Creating the project for the policy helper

To create a "policy helper" application, use Visual Studio to create a console application project. The following steps show how to create the project:

  1. Create a Visual Studio console application project.

    Open Visual Studio.

    Warning: You must be using Visual Studio 2010 or later, and your project must target the .NET Framework 4.

    In the File menu, point to New, and then click Project. In the New Project window, choose Visual C# from the Project types list. In Templates, select Console Application from the list of Visual Studio installed templates.

    Enter a name for your project. Typically, the name identifies the document type and the application that installs policy metadata. For example, the "policy helper" application for the sample Leads service uses the following name:

    InstallLeadPolicyMetadata
    
Review the Location and Solution Name, and click OK.
  1. Add assembly references.

    Open the Project menu, and choose Add References. The Add References window opens. Click the .NET tab. Select the following assembly, and then click OK:

    • System.Configuration

    Open the Project menu, and choose Add References. The Add References window opens. Click the Browse tab and navigate to the Dynamics GP Services "GPWebServices" folder, typically found in the following location:

    C:\Program Files\Microsoft Dynamics\GPWebServices

    Select the following assemblies, and then click OK:

    • Microsoft.Dynamics.GP.InstallData.dll

    • Microsoft.Dynamics.Common.dll

    • Microsoft.Dynamics.Common.Types.dll

    • Microsoft.Dynamics.GP.DataAccess.dll

  2. Add an application configuration file.

    In the Project menu, choose Add New Item. Select Application Configuration File from the list of Templates. Leave the default name of App.config, and then click Add.

    Use Solution Explorer to verify that your project includes a file named App.config.

  3. Save the project.

    From the File menu, choose Save.