web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to track progress of a Full CIL compile

(0) ShareShare
ReportReport
Posted on by

We had started a full CIL compile and it finished within an hour. The next day we ran it again as we had some caching in reports and online sources suggested a full compile. This compile has been running for 2.5 hours so far. 

We read the basic concept of how compiling works (link) and it seem that it uses a while(true) loop to keep retrying compile method on all elements. Also a compile can have N number of phases (passes). 

My question here is how to track the progress of full CIL compile? Is there a way to atleast know in which phase or pass the compiling is now?

We could not fin any queries regarding this in online resources except this and still no one was able to answer.

Our concern here is that we have requested a system down time so we can compile knowing no one is utilizing any resources or doing any transactions on the database. From the general experience of people online a compile can take 5, 8, 10 and 11 hours, we cannot have such a long downtime for the system.

Our machines are physical machines with specs as follows:

Note: The RAM and the CPU are not fully used during the compile. 

SQL Machine : 4 Cores (8 logical processors), 16gb RAM (RAM utilized 12.8gb increases with time, CPU utilized 0.8 ghz max)

AOS Machine : 4 Cores (8 logical processors), 16gb RAM (RAM utilized 4gb max, CPU utilized 1.6 ghz max)

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    236,279 Most Valuable Professional on at
    RE: How to track progress of a Full CIL compile

    It seems that you're going to compile the application in production, but it's not needed. Actually, it's not the recommended process. You should build the application in a pre-prod environment and deploy the whole modelstore, including compiled X++ and CIL. Then you don't have to waste time to take down your production environment for a long time.

    Usually CIL compilation takes something like fifteen minutes, so I've never seen much need for tracking progress. You should at least see some information about progress if you generate CIL through GUI.

  • Community Member Profile Picture
    on at
    RE: How to track progress of a Full CIL compile

    Hi Martin,

    Thank you for your reply,

    By restoring model store you mean restoring the model database from the compiled environment to the production environment?

    Any assisting resources regarding this approach will be helpful.

  • Community Member Profile Picture
    on at
    RE: How to track progress of a Full CIL compile

    Regarding the progress as I mentioned above a link which has same problem that the client window goes in not responding mode. So the output messages are not visible.

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: How to track progress of a Full CIL compile

    There already is a whitepaper about deploying customizations across environments.

    technet.microsoft.com/.../hh292604.aspx

    You have to use a modelstore from a source environment (staging/build) that is initially created by using the modelstore of Production (with an empty AX data DB), to match object identifiers.

    The modelstore release would not require you to do any compilation in Production at all, since the AX ModelStore already has the X++ source code, MorphX objects, compiled p-code and compiled IL code. You'd only have to synchronize the Data dictionary in case you modified the metadata, and deploy AIF ports if you have changed any services.

    We are using similar release method to what is outlined in the guide, but we use our own PowerShell maintenance script for that. The full maintenance process rarely takes more than an hour, with the actual Production outage being less.

    As for your initial question: the CIL compilation is stored in the SysXPPAssembly table within SQL Server that is being regenerated. Maybe you could check progress there. I have not checked if the table is truncated or not before compilation, or if it is running in a transaction, in which case you might have to do a dirty read (using nolock) to access created/changed records.

  • Martin Dráb Profile Picture
    236,279 Most Valuable Professional on at
    RE: How to track progress of a Full CIL compile

    The document that Vilmos linked (Deploying Customizations Across Microsoft Dynamics AX 2012 Environments) is a must-read; you shouldn't start planning your processes before reading and understanding it. Among other things, it answers your question about how to install a new version of modelstore.

    Regarding SysXPPAssembly, I believe that all files are generated on disk first and uploaded to the table at once, therefore observing the table wouldn't help, but the same idea might work for those files on disk.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: How to track progress of a Full CIL compile

    Thank you Vilmos and Martin for your inputs. I read the paper and understood the concept of moving the model store to deploy customizations. I think our scenario is different, I have explained my case in a new thread as the discussion of model store is way off topic for this thread.

    The answers to this thread is as follows:

    The SysXPPAssembly table does not insert any records when compile is in progress like Martin said.

    There are no files created during the compile either. We kept an eye on the XppIL folder while compile was in progress.

    Our conclusions are that if one runs the full compile from an AX client, the client can go in not responding mode and there is no way to know at what stage it is now. We used the command line that allows us to run compile in multi threads. As a bonus cmd shows us what each thread is compiling class by class table by table. This way compile was faster (from a 3.5 hr compile time to 1 hr 10 mins) and we could see what is compiling now and in which pass.

  • Verified answer
    Martin Dráb Profile Picture
    236,279 Most Valuable Professional on at
    RE: How to track progress of a Full CIL compile

    I think you still don't understand that there are two distinct process: compilation of source code to X++ and generating CIL from X++. If you're using AxBuild, you're talking about X++ compilation and not CIL, so it's no surprise that you see no CIL code generated.

    Do you mean X++ compilation from the beginning and you were talking about CIL (in both the title and your description) by mistake, because you didn't know that it's a completely different thing?

  • Community Member Profile Picture
    on at
    RE: How to track progress of a Full CIL compile

    Hello Martin,

    It indeed seems that I have some misunderstanding. 

    I read this link made it clear to me that there are three type of code x++, pcode and CIL. The command line I used compiled from x++ to pcode (equivalent to right clicking AOT node and clicking compile).

    To generate CIL, pcode is converted to CIL. To do that one has to do generate full CIL from the development workspace. Isnt there a way through command line to execute that?

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: How to track progress of a Full CIL compile

    You can start CIL generation from command line by calling ax32.exe -startupcmd=CompileIL .

  • Suggested answer
    NareshAX Profile Picture
    20 on at
    RE: How to track progress of a Full CIL compile

    Go to DynamicsAX/Bin/Xppil folder

    Find Dynamics.Ax.Application.dll.txt file

    this file is updated while CIL is being generated.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans