The build system for Dynamics AX7 saves the diagnostic messages in files, as well as presenting them in the error message window. The actual location of the diagnostics file can be provided to the command line X++ compiler (xppc.exe), but inside VS it is always stored in the package directory (i.e. C:\AOSService\PackagesLocalDirectory\FleetManagement for the fleet management package). There are two files: One containing the error messages as a log file (BuildProjectResult.log), i.e. as a simple list, and the other ((BuildProjectResult.xml) containing an XML representation.

There are two reasons this file is useful:

  1. The diagnostic messages can be consumed by other XML aware tools; this is what we will be describing in this blog
  2. The diagnostics can be directly pasted into the exclusion list, so the can be omitted from the final list of errors, under some circumstances.

Let's imagine that you have just done an upgrade, and that you have a ton of diagnostic messages and you want to make some sense of them. The easy way to do this is to simply include them in Excel. Once they are there, there is no limit to the things you can do with them, slicing and dicing the information to satisfy whatever need you may have.

Doing this is quite simple: Start excel with a blank workbook. Go to the Data tab and select "Get External Data". From there select "Other sources" and provide the path to your BuldProjectResult.xml file. After saying that it will infer the schema from the data, it will load the data in a nice set of rows.

Now you can go ahead and generate the pivot table to see where the issues are. Go ahead and order by file, understand which ones are best practices, which ones are fatal and need to be fixed first etc.

There are other interesting options: I have used Excel here, although I could also have used Power BI to achieve similar results. You could mine the information with tools based on XPath, or store it in an XML database (like BaseX) and do all sorts of interesting things. I will leave that as an exercise for the interested reader.