Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Full CIL generation Error @ AX 2012 R2:

Posted on by 1,006

Hi - Having this errer when running full CIL. Has any body an idea to get rid of it?

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

 at System.Collections.Generic.List'1.get_Item(Int32 index)

 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.

 regards
Beat
 

 

*This post is locked for comments

  • Husna Yusuf Profile Picture
    Husna Yusuf 1,090 on at
    RE: Full CIL generation Error @ AX 2012 R2:

    guys,

    now my machine running compile on AOT,... take a long time.ill get back to you later guys, and inform the result.

    Terimakasih.Thank you very much.

    Regard,

    Husna

  • Suggested answer
    skaue Profile Picture
    skaue on at
    RE: Full CIL generation Error @ AX 2012 R2:

    You should be good by simply doing a full AOT compile, synchronize Data Dictionary and finally do a full CIL generate.

    Deleting the content in XppIL and/or the SysXppAssembly-table is a last resort and more often a symptom for an unstable development environment.

    Occasionally, you also need to restart the AOS/Client for it to pick up on potential new assemblies being completed on the first compilation iteration, but so far I've only seen that with third-party solutions.

  • Suggested answer
    ArunGarg Profile Picture
    ArunGarg 3,924 on at
    RE: Full CIL generation Error @ AX 2012 R2:

    Hi,

    Please follow the below steps:

    1. Stop the AOS.

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

    3. Start the AOS.

    4. Perform a Full CIL.

    5. Perform a Incremental CIL.

    Thanks & Regards

    Arun

  • Suggested answer
    Beat Profile Picture
    Beat 1,006 on at
    RE: Full CIL generation Error @ AX 2012 R2:

    Hi Husna, this error is based on using an enum value that does not exists at the enum anymore. I did not see this error on a full compile. What i did i compile the table tree, then class tree on its own. Then a compile error was shown. I then fixed it. After this i could generate the CIL.

  • Husna Yusuf Profile Picture
    Husna Yusuf 1,090 on at
    RE: Full CIL generation Error @ AX 2012 R2:

    Hi Beat,

    btw, can you describe how to solve this problem? ...

    i've got same error with you.

    Thank you very much.

    Regard,

    Husna

  • Verified answer
    Beat Profile Picture
    Beat 1,006 on at
    Re: Full CIL generation Error @ AX 2012 R2:

    It is solved. Even full compile (right click on top node in AOT and select coompile) run without any error - log prooved -. When i compiled tables or classes only it showed errors on several baseEnum. Fixing these - CIL generation was possible.

  • ARPIT CHAVHAN Profile Picture
    ARPIT CHAVHAN 4,359 on at
    Re: Full CIL generation Error @ AX 2012 R2:

    Hi Beat,

    I can tell you what I observe during CIL generation. It will run succesfully only when you dont have any error in your AOT. First see to it that the development you have done doesnot have any error left and then try to run CIL again.

  • Suggested answer
    skaue Profile Picture
    skaue on at
    Re: Full CIL generation Error @ AX 2012 R2:

    You can investigate the details around the error by finding the CIL compilation error log under \Program Files\Microsoft Dynamics AX\60\Server\YOUR_INSTANCE\bin\XppIL\Dynamics.Ax.Application.dll.log

    Given your AOT compiles without errors, CIL should compile. Sometimes there are dependent assemblies not being loaded correctly, which means either the service or the client needs a restart to pick them up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans