Hi Folks,
In our daily work progress when performing the Incremental CIL suddenly you will be prompted with the below error as the CIL generator found errors and could not save the new assembly. Dont get tensed it is very to solve quickly.
Incremental CIL: Error when loading the field. Type:XY_FormTreeDatasource, Field: imageList System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Reflection.Emit.FieldBuilder..ctor(TypeBuilder typeBuilder, String fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes) at System.Reflection.Emit.TypeBuilder.DefineFieldNoLock(String fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes) at System.Reflection.Emit.TypeBuilder.DefineField(String fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes) at System.Reflection.Emit.TypeBuilder.DefineField(String fieldName, Type type, FieldAttributes attributes) at Microsoft.Dynamics.Ax.Xpp.ILGenerator.loadFieldsIL(TypeBuilder typeBuilder) at Microsoft.Dynamics.Ax.Xpp.ILGenerator.declareFields() at Microsoft.Dynamics.Ax.Xpp.ILGenerator.GenerateXppModule() The CIL generator found errors and could not save the new assembly.
Resolution:-
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.
5. Perform a Incremental CIL.
Many Thanks,
Rudra
"Helping others without any expectation will always made the others to help you"