AX 2012 - Error in CIL Generation: "CIL generation: Object reference not set to an instance of an object."

Hi Readers, Today, in this post we will share a very important solution about the following error: Error: Error in CIL Generation : "CIL generation: Object reference not set to an instance of an object." Err:351 We got the above error while doing Full CIL. You may get this error after a incremental or Full CIL. Solution : 1. Go to AX services and stop the AOS. 2. Go to C:\Program Files\Microsoft Dynamics AX\60\Server\Microsoft_Dynamics_AX\bin and rename XppIL folder as XppIL_Old. After successful CIL we will delete XppIL_Old folder and a new XppIL folder will be automatically created in this folder by AX. 3. Start the AOS services. 4. Login to AX. 5. Go to development environment by pressing CTRL + D and generate Full CIL. 6. If you are still getting the errors after Full CIL please check the objects individually which are throwing the errors and resolve them. 7. Once all the errors are resolved compile them. Please click here to know...