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 more about group compilation.
8. If you want to perform parallel compilation for all the AOT objects please click here to know more about it.
9. After successful compilation generate Full CIL again.
10. Now, delete the XppIL_Old folder.


11. Full CIL has been done successfully.


Note: Although after performing Full CIL, CIL was successful but we got the error while performing these steps like 'AIF service group not activated'. You might get this type of error, for resolution of such type of errors please click here.

Comment below if this article helped you to resolve your CIL generation issue...

Author:
Chirag Gupta
Microsoft Dynamics 365 AX Technical Consultant at IBM Bangalore

Date:
21-Sep-2019

Happy Learning !!

Comments

Post a Comment

Popular posts from this blog

[Solved] : Error: String or binary data would be truncated. Cannot execute a data definition language command on Vendor (VendLedgerReconciliationTmp)

AX 2012 - Command prompt compilation / AxBuild.exe for Parallel Compile on AOS of X++ to P-code / Parallel Compilation

AX 2012 - How to send SSRS report in email as an attachment using X++

AX 2012 - How to stop AOS when services got stuck at stopping status

AX 2012 - How to make a form field mandatory

Error: There was no endpoint listening at net.tcp://your_server_name:8201/Dynamics AX/Services…

Fetch vendor address using X++ in AX 2012

AX 2012 - How to print current date and time on SSRS Report

[Solved] : AX 2012 - No connection could be made because the target machine actively refused it 192.168.10.249:8201

[Error] - Error in unit of amount in currency KES. Must be rounded to 0.01 | The unit of 37.563.5343100000000000 KES being posted to account 32710001-- is outside the current penny rounding threshold | Posting has been canceled