Use the form transformation configuration file, Microsoft.Dynamics.Nav.Tools.FormTransformation.exe.config, for the following purposes:
-
To define file names and path locations for input and output files. The form transformation tool references these files during execution.
-
To define the scope of logging by specifying what types of exceptions you want to include in the output log file.
If you have saved your files to the default locations and if you want to use the default scope of logging, then you do not need to modify the Microsoft.Dynamics.Nav.Tools.FormTransformation.exe.config file.
File Locations
By default, the location of the input and output files is the same as the location of the tool. The configuration file contains the following lines, which specify the names and locations for input and output files.
Copy Code | |
---|---|
<configuration> <appSettings> <add key="FormsFile" value=".\Forms.xml"/> <add key="PagesFile" value=".\Pages.xml" /> <add key="IgnorePages" value=".\IgnorePages.xml"/> <add key="MovePages" value=".\MovePages.xml"/> <add key="TransformPages" value=".\TransformPages.xml"/> <add key="DeletePageElements" value=".\DeleteElements.xml"/> <add key="MovePageElements" value=".\MoveElements.xml"/> <add key="CodeRules" value=".\coderules.txt"/> <add key="TranslationFile" value=".\PageTranslations.txt"/> <add key="SchemasPathLocation" value =".\"/> |
You can change this information in the configuration file if you want to use input files from a different folder or if you change the names of the input or output files.
Scope of Logging
You can control the size and focus of your log file by including only the exceptions in which you are most interested. The following table describes the exception message types.
Message Type | Description |
---|---|
ChangeCodeManually |
Transformation of a specified control or property could not be completed. Additional, typically manual, change or input is required to address the exception that is associated with this message. |
CheckInputFile |
There is an inconsistency in an input file. |
CodeCannotBeTransformed |
Code cannot be transformed automatically. Manual change to the form itself is needed. |
Error |
Any error. Typically, the transformation tool cannot recover after such an error. |
General Information |
Any information. Typically, no action is required. |
IgnoreForms |
Specified form was excluded from the transformation and no matching page was created. |
IgnoreWarning |
Verify that there is not an issue, and then ignore this warning. |
InputInformation |
Information about input files. |
RemoveControls |
Specified control on the form was not mapped to a matching control on a page. |
ValidateManually |
Specified control or code has been changed during transformation. The change requires manual validation. |
Warning |
Any warning. Requires manual validation. |
To configure which type of messages to include in the log file and the degree of message details, you assign a value code to each message type in the Microsoft.Dynamics.Nav.Tools.FormTransformation.exe.config file, and then set the TraceLevelSwitch value to specify the logging level.
The following example from the configuration file shows the default value code assignments for each message type.
Copy Code | |
---|---|
<add name="Error" value="1" /> <add name="CodeCannotBeTransformed" value="1" /> <add name="Warning" value="2" /> <add name="GeneralInformation" value="4" /> <add name="IgnoreForms" value="3" /> <add name="IgnoreWarning" value="2" /> <add name="InputInformation" value="1" /> <add name="RemoveControls" value="3" /> <add name="ChangeCodeManualy" value="2" /> <add name="ValidateManualy" value="3" /> <add name="CheckInputFile" value="1" /> |
Based on the preceding value codes, the default logging levels can be described as follows:
-
1 Logs error messages and required information
-
2 Logs errors and warnings
-
3 Logs detailed error information
-
4 Logs verbose information
-
0 Logging is turned off
To specify the level of logging, you set the TraceLevelSwitch value. For example, in the following code, the logging level is set to 1, log error messages and required information.
Copy Code | |
---|---|
<add name="TraceLevelSwitch" value="1" /> |
You can modify the level of logging or the value code for each message type in the Microsoft.Dynamics.Nav.Tools.FormTransformation.exe.config file.