Wednesday, 29 July 2015

Errors CIL Generation, Database Synchronize in AX 2012

A Parameter Could Not Be Serialized

For a quick resolve: Uncheck option "Excute business operations in CIL"  under Tools-> Options -> Development tab.












The reason is that you haven't been able to do a successful FULL CIL compile.
Run again and try to fix the error in CIL.


CIL Generation Source Array Was Not Long Enough
  1. Stop the AOS.
  2. Delete all of the source in the C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL directory.
  3. Start the AOS.
  4. Perform a full CIL generation.
  5. (Only do if errors are still there and you have no error when compile X++, just comment the code notice in Compiler output with /*..*/, recompile CIL and delete comment tag)

CIL generation error : The given key was not present in the dictionary

  1. Check the CIL log file, generally located at "C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL\Dynamics.Ax.Application.dll.log"
  2. You will find the AOT object for which the CIL generator found the error.
  3. Compile that object, fix the error, or delete (if needed) and then regenerate the IL.
  4. (Only do if errors are still there : Stop AOS > Delete the .auc file from users\\Appdata  folder > Restart AOS)

DB synchronize error: "Field mismatch in union query. Field ... is not compatible with field 

Check your EDT concern to that field ( in query, table, view). They have different size.
So you just change the size to be the same.
Or check someone changed size of standard EDT. It's the reason cause this error

Duplicate type with name 'Dynamics.Ax.application.' in assembly 'Dynamics.Ax.application 

1. Stop the ax service.

2. Truncate the SysXPPAssembly in db model
3. Delete all the files in below directory in server where AOS hosted:

C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL

4. Start the service

5. Compile full CIL



The CIL generator found errors and could not save the new assembly



Step 1: Stop the AOS

Atep 2: Delete all of the source in the C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL directory

When you do this, just delete all the files within the XppIL folder that are outside of other folders. 



Step 3: Start the AOS


Step 3: Perform a full compile (it will not work without doing this)


Step 4: Perform a full CIL generation


The drawback of this fix is that it takes a long time to complete. However, this fixes the issue, which is the desired outcome, and the services deployment and incremental CIL compilations moving forward would be error free.

As you can see, the service was deployed correctly and if I opened my inbound port I'll see it there.


UPDATE:

After a FULL CIL compilation I got the following errors:
 
AOT > Class> ReleaseUpdateDB41_Basic
 
 
I just went to the object in question and compiled them separately.

 
 
The outcome would correctly compiled all the artifacts, including my new service gorup.