Are your AX2012 builds taking too long?

Are your AX2012 builds taking too long? Here’s a bit of advice from AgileCadence’s James Brentley…

Many years ago…

Back in 2014 at the Microsoft Dynamics Technical Conference in Seattle, AgileCadence came across a very important piece of knowledge which has proved invaluable in the DevOps pipelines that we build for our Dynamics AX customers.

To this day most of the pipelines we see are using a very slow method to do what is in essence the most important part of your build process…

…Importing the large combined XPO file.

Combined XPO files can be very large and you will undoubtedly be doing this using the command line similar to the excerpt from the book Inside Microsoft Dynamics 2012 R3 by Microsoft Press:

Import the new .xpo file by using the command-line parameter -AOTIMPORTFILE=-MODEL= to Ax32.exe. This step imports the .xpo file and compiles everything. After this step is complete, the new model is ready in the model store.

OK, so the above statement and the command line that you will form can be found all over the internet, on Microsoft boards, blogs, GitHub build scripts, you name it, you are going to be using the above command.

So what’s the issue?

You have a pipleline however simple or however complex that needs to run quickly and repeatably, especially if like us, you need that pipeline to work in a CI/CD way. The quicker the better. That command above can take hours to complete which is a VERY, VERY, BIG ISSUE.

What can you do about it?

This is the good bit and for the 90% of people who don’t know this, let it be a gift from AgileCadence to you.

On page 18 of the slide deck from the Technical Conference is something that people may have missed or don’t even know is possible.

**********Load combined XPOs into AX using ax32Serv.exe**********

Ax32Serv.exe -console 01 -model=@Model.xml -aol=”%Layer%” -AOTIMPORTFILE=%xpoFile% nocompile

The results?

Yes, you are importing the XPO without the use of the client, direct through the AOS server. And the time difference is astonishing:

Large XPO via Client: 2 hours+

Large XPO via AOS: 10 minutes!!!!

You’re welcome

This has been one of our closely guarded secrets, but we like to share…