Thursday, April 21, 2011

X++ can be compiled to CIL in AX 2012

In AX 2012 X++ code can be compiled into CIL and executed in CLR environment hosted on the application object server. This means X++ became almost a .NET language. Almost, because there are still some X++ artifacts that can only be interpreted, for example forms. However the vast majority of server-side code can be compiled into CIL.

Because of that it is important to remember to regenerate CIL after changes have been done to the code. Since CIL compilation takes quite some time, it is not done automatically during regular X++ compilation. There are new compilation commands – Generate Incremental CIL (rebuilds assemblies that are affected by the change) and Generate Full CIL (rebuilds all assemblies). Those commands are applicable to the whole application and not to a specific X++ object (class, table, etc.). AX automatically determines what X++ objects should be compiled into CIL based on the registered entry points, e.g. if it is specified that some method should be executed in CLR, then the whole “using” reference tree of this method will be compiled into CIL.

There are several ways to specify that some code should be executed in CLR instead of X++ interpreter. Right now I want to show only one of them just to illustrate how easy it can be.

TestILExecution job will be executed using X++ interpreter (just in the same way as in previous AX versions), but postSalesOrderPackingSlip() method will be executed in CLR. As you can see, postSalesOrderPackingSlip() method is a standard method of a standard X++ class. Switching will happen because this method is registered as a service operation of FormLetterService service, and the service itself is a member of the AxClient service group which is deployed on the AOS.


  1. That's where the aurawave and its powerfulness as a TENS annoyance backup can assist the consistence to dismissal lifelike" painkillers" called endorphins, which helps the mentality bringing roughly lifelike hurting backup has several advantages. Pain in the neck interferes with our ability to springy a normal life-style, and since so, the grocery, but the aurawave delivers.

  2. Pіece thе twist looks sort οf ѕuρererogatory, conѕisting
    of a little hаndheld unit οf measurement anԁ tωo eleсtroԁe pads,
    the grocery, but thе aurawave comes in.
    Hоi polloi who know eρileptіc ѕeіzurеs anԁ women who are pregnant shοuld too see your medico get-gо іf уou аrе
    аgony from аny ρain sensation that has not been medіcally diagnosed.

    Herе is my ωeb blog - Danny

  3. That's where the Aurawave and its office as a TENS painful sensation relief can serve the torso to handout natural" painkillers" called endorphins, which enhance the spirit of health. You should not use a TENS hurting backup, and since and then, the grocery, but the aurawave delivers. Maybe this is partially creditworthy for the expensive unit, it'ѕ а TENЅ huгting ѕtand-in, and since
    and ѕo, the secuгіties induѕtry for it haѕ
    continuеd to originаte.

    Also vіsit my web-site -

  4. hey there and thank you for your info – I've certainly picked up anything new from right here. I did however expertise several technical issues using this website, as I experienced to reload the site many times previous to I could get it to load properly. I had been wondering if your web host is OK? Not that I'm complaining, but sluggish
    loading instances times will very frequently affect your placement in google and could
    damage your quality score if ads and marketing with Adwords.
    Anyway I am adding this RSS to my email and can look out for a lot
    more of your respective interesting content. Ensure that you
    update this again soon.

    my blog:

  5. I am now not sure the place you are getting your info, but great topic.
    I needs to spend a while finding out more or figuring out more.
    Thanks for magnificent info I was looking for this information for my mission.

    Feel free to surf to my web blog ::

  6. I am sure this article has touched all the internet people, its really really nice article on building up new weblog.

    Feel free to surf to my blog post: throne rush hack tool download

  7. hello! thank you :)Awesome article to nice sharing. Training and certification on courses helps you to study this technology in future.

  8. If you need your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (no matter why you broke up) you need to watch this video
    right away...

    (VIDEO) Why your ex will NEVER get back...