Using the Dictionary Assembly Generator
The Dictionary Assembly Generator (DAG.exe) is installed in the location where you installed Visual Studio Tools. Typically this will be the following location:
C:\Program Files\Microsoft Dynamics\GP2013 VS Tools SDK
Hint: If you are using a 64-bit version of Windows, the files will be located in the Program Files (x86) folder.
The Dictionary Assembly Generator is a command-line tool, and should be run from a command prompt. Open a command prompt and set the current location to the folder where DAG.exe is located.
To view the command syntax, use the following command at the command prompt:
The Dictionary Assembly Generator uses the product ID to identify the dictionary for which you want to build the application assembly. Look in the launch file (typically Dynamics.set) for a list of the products installed.
Optionally, you can specify the launch file that the Dictionary Assembly Generator will look in to find the list of installed products and the corresponding dictionary locations. If you don't supply the name of the launch file, DAG.exe will look for the launch file named Dynamics.set in the current location.
Hint: Since you are running DAG.exe from a different location than where Microsoft Dynamics GP is installed, you will need to supply the complete path to the launch file.
Warning: The Dictionary Assembly Generator must be able to write to the location where it is being run from. This means the user running DAG.exe must be part of the Administrators group or the Power Users group. On a system running with User Account Control (UAC), it means launching DAG.exe with Administrative privileges.
Building an application assembly
The Dictionary Assembly Generator will build an application assembly for the main dictionary for an application or for the forms dictionary for an application. When generating an assembly for an application dictionary, use the /M parameter. For example, the following command generates the application assembly for the main dictionary of the Sample Integrating Application. This application has the product ID value 3333. The path to the launch file (Dynamics.set) is supplied.
dag.exe 3333 "C:\Program Files\Microsoft Dynamics\GP\Dynamics.set" /M
This command produces two files:
To generate an assembly for a forms dictionary, use the /F parameter. For example, the following command generates the application assembly for the forms dictionary of the Field Service product (with dictionary ID 949).
dag.exe 949 "C:\Program Files\Microsoft Dynamics\GP\Dynamics.set" /F
This command produces two files:
Hint: Refer to Modified forms for details about creating an application assembly for the forms dictionary (Forms.dic) used by Microsoft Dynamics GP.
Signing an application assembly
You may want to sign the application assemblies you create. This is a good practice, because it helps ensure that only the official version of an application assembly is being used. The Dictionary Assembly Generator can sign the assemblies that it creates. It can fully sign the assemblies, or delay sign them. You can use the SN.exe utility (included with the .NET Framework) to create a strong name key file (.snk) used to sign the assembly.
Warning: After you create and use a strong name key file, keep it in a safe location. You will need to use it every time you build or rebuild application assemblies.
The following example shows how the application assembly for the sample integrating application is fully signed using the Sample.snk strong name key. The Sample.snk file was generated using the SN.exe utility.
dag.exe 3333 "C:\Program Files\Microsoft Dynamics\GP\Dynamics.set" /M /S:Sample.snk
Overriding the application assembly name
When creating an application assembly for a dictionary, the Dictionary Assembly Generator will use the product name from the launch file. This may not be the name you want to use for the application assembly. You can use the /N parameter to specify a different name for the application assembly being generated.
For example, the following command will create an application assembly for the sample integrating application, but use the name "Develop" instead of the product name in the launch file.
dag.exe 3333 "C:\Program Files\Microsoft Dynamics\GP\Dynamics.set" /M /N:Develop
The generated application assembly will have the name Application.Develop.dll.
Overriding the main referenced dictionary name
When generating application assemblies for dictionaries that integrate with Microsoft Dynamics GP, the Dictionary Assembly Generator must be able to reference the application assembly for the main dictionary (typically Application.Dynamics.dll). If the application assembly for the main dictionary has been given a different name, you can use the /NM parameter to specify which new name so the application assembly can be found.
For example, if the application assembly for the main dictionary was named Application.DynamicsGP.dll, you would use the following command to create an application assembly for the sample integrating application. Notice that the /NM parameter is used to specify the name of the main application assembly that is being referenced.
dag.exe 3333 "C:\Program Files\Microsoft Dynamics\GP\Dynamics.set" /M /NM:DynamicsGP