Partial compile

Hello all,

I have to deploy AX from build environment to prod environment by using shared project’s xpo file.

So after import xpo files,I must complile but I don’t want to FULL compile .

I plan to compile only a model that we devloped and execute by script.

I don’t have any idea to create compile script with arguments that is speified modelname.

Anyone has any idea or solution?


Don’t deliver code to production environment by .xpo files! It’s the worst thing you can do. Moving by .xpo files doesn’t guarantee that exactly the same version is delivered, sometimes things are not imported correctly, you might screw up object IDs, you need access to the development layer in Prod, you have to compile the whole application (i.e. the delivery takes time) and so on and so on.

You should move the model store (in AX 2012) or layers (in older versions). It has many advantages. For example, if you move the whole model store, you don’t have to compile X++ and generate CIL in Prod, therefore your don’t have to stop the environment for a long time.

.xpo files can be used in development environments, nevetheless you have to compile the whole AOT if you want to be sure that everything is compiled correctly. Don’t waste your time with something what won’t guarantee a working application. Instead of that, automate the whole thing.

Thank you Martin.

I understand the deployment with using xpo files is the way we must avoid.

At first, the deployment way that I planed to was by using staging environment.

1.Get code from dev environmet to Build environment.In build environment,execute full compuile, full sil compile and DB sync.And then export .axmodel file.(whole process needs about 1:40 with axbuild.exe)

2.Import .axmodel file to staging environment that is made from Prod environment’s modelstore.Then execute full compuile, full sil compile and DB sync.After that,export .axmodelstore file.(whole process needs about 1:40 with axbuild.exe)

3.Import .axmodelstore file to Prod environment,and execute DB sync.(whole process needs about 0:40)

But the method above needs long time to prepare to deploy to Prod environment.

Some people in the project I am asigned don’t want to wait so long time[:’(].

(I believe that the way above is not so bad.)

How do you think about the deployment way I planed?


Where would they want to save time? You have to compile the environment sooner or later - even if you gave up the staging environment, you would have to spend the same time in production. All what you would save is the migration from staging to Prod. Is it really worth the drawbacks (increased off-time of Prod, increased risks)? I don’t believe so.

Compiling the application is not optional. Just that somebody “doesn’t want to wait” is irrelevant. Do they want pay taxes? They don’t technically have to, but it would have consequences. :slight_smile:

In my experience, preparing a release takes a long time exactly if people import .xpo files and do other manual interventions. If the process is automated, the exact length is not very important. Everybody can wait two hours before the build is done; problem begin when developers must merge code, imports get into conflicts, issues with non-compiled code are found in production and so on. Automated processes are fast, predictable and ensures that no step is skipped.

Your process makes sense to me. You’ll also find the Microsoft point of view in Deploying Customizations Across Microsoft Dynamics AX 2012 Environments.

Thank you for giving me the link to the whitepaper.

I could believe my first plan was almost right.

But all that I have to do first is persuade the people in the project to wait for deploying.
(It is painstaking work.)

The reason why I avoid to deploy with modelsotre is the team can have healthy life.In my previous project,the team to deploy was forced to hard work from 7:00 to 0:00.The project needed twice or more deployment.

I really thank you, I know the risk xpo files’s deployment.