Last day I was asked again why do we get this error when generating Full CIL "CIL generation: Value cannot be null. Parameter name: parameterType". A lot of fixes like deleting the dll files from the XppIL folder, restart the AOS and retry, etc were tried but nothing resolved the problem.
1. when unsure when was the last time you did a full AOT compile, just do it now. It takes less then 20 minutes, so it it worth the wait - use the parallel compiler (I imagine you do have it by now, it requires R2 CU7 so ...; do not compile from AOT - it takes well over 2 hours, yes that much for those of you new to AX who didn't use to wait 4 hours for a compilation :) ). To use it just
stop the AOS first,
open a cmd,
cd c:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\
run axBuild xppCompileAll /s:01 /v (01 in the code means to run it on AOS instance 1 defined in the registry - I assumed you are doing this on a dev machine with only one AOS; if not use the 0x specific to your instance),
and finally check the compile log for errors c:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Log\AxCompileAll.html (be sure to open it with Internet Explorer and click on Allow blocked content). You must make sure that you have Errors: 0, otherwise you have to correct the errors first and compile again (only those objects if it's 1-2 errors, but if too many, a new full compile might be required).
2. now you can do a Full CIL. It takes around15 minutes, but again, it is ok the wait, compared to doing an incremental (less time) but you're not sure what p-code (AX xpp code) you actually have as IL-code - and this is not what you want. Also, do a Full CIL when you've just deleted an object. The incremental doesn't know you have done that and it will not update the IL code.
Moments when you can do an Incremental CIL: when you have done a generate CIL (be that full or incremental) within maximum 24 hours before, without getting errors, and have only added or changed a few objects (or methods on them) which compiled in AX properly.