X++ to CIL: Object must implement IConvertible

Somebody asked in Dynamics User Group forum about an error thrown by RetailCommonWebAPI running in a batch in AX 2012 (RetailCommonWebAPI in batch mode). I don’t want to discuss that particular problem here, but I want to show the underlying cause, because it’s actually quite tricky. What I’m discussing below is related to CIL generated …

Continue reading ‘X++ to CIL: Object must implement IConvertible’ »

Operand types are not compatible

I managed to produce a really confusing error in AX 2012. Look at the following piece of code: MyExtendedDataType a, b; a = b; Pretty boring, isn’t it? There is nothing to fail… except that I got a compilation error: Operand types are not compatible with the operator. What? Actually it become quite clear as …

Continue reading ‘Operand types are not compatible’ »

Compile backwards

Today I noticed that Type hierarchy browser in AX 2012 R3 allows you to compile types backwards: Context menu in AOT supports only forward compilation. It’s possible that the feature is there for some time and it just took me long time to notice it, because I normally don’t compile code from Type hierarchy browser.


Just a quick one to bring your attention to something what you may have missed. Microsoft released a command-line tool for Dynamics AX R2 CU 7 called AxBuild. It’s capable of compiling X++ code directly on AOS and doing it in several threads in the same some time, which has a huge effect on performance. …

Continue reading ‘AxBuild.exe’ »

AX compilation log parser

Dynamics AX allows you to export compilation output to a file (.html). The file can be imported back into AX and then you can work with compilation results in Dynamics AX application in the same way as after a normal compilation. That’s useful for later analysis without a need of recompilation, for automated builds and …

Continue reading ‘AX compilation log parser’ »