AX7 / D365: The “… not compiled with chain of command feature …” Error

When you boot up a new VM with AX >= PU 9 and try to extend the code with chain of command, chances are high that you might run right into the following error: “The assembly which contains class ‘ClassName’ is not compiled with chain of command feature, so method ‘MethodName’ cannot use chain of command in this extension...