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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Deploying customizations and managing releases with source control AX2012

(0) ShareShare
ReportReport
Posted on by

Hi All,

At our company we use AX2012 R2 and still release customizations to our live server using XPO files with an incremental IL compile (or full IL compile depending on the changes) I know XPO releases are considered 'barbaric' in 2012 and we do run into issues regularly so I'm looking at changing our deployment strategy to exporting\importing the full model store as suggested by Microsoft, but I'm still unclear on a few aspects so hopefully I can find some answers here or get an idea on how to best handle the deployment.

We have a development enviroment that is currently used by 3 developers, all our customizations are in a single model and we use MorphX VCS for the version control.

As we have multiple ongoing customizations being developed by different developers we need to be able to deploy only the completed customizations that are ready to move to our test or production system.

I can imagine a model store being comparable to a the bin folder in a a C# visual studio project, so please bare with me while I loosly compare the 2 to gain understanding of AX2012. With visual studio and a basic source control system users can check out and work on code as they need, and when releasing code to production only the code that is checked in can be compiled and released. If something similar could work for us in AX2012 that could meat our requirements. From my research I understand that is definetly not possible using MorphX VCS because it does not support isolated development. We do have licences for SourceSafe and Team Foundation Server but I do not know enough about these products and their integration with AX2012 to understand if they will help meet our goals.

So, there are a 2 questions I have:

1) If I implemented SourceSafe or Team Foundation Server would we be able to generate a model store based on only the checked in customizations.

What worrys mes here is:

User A checks out objects for modification and compiles the IL code for their internal testing.

User B has nothing checked out and wants to generate the model store based only on checked in code.

Can user B generate a model store based on only the checked in code? Or when user A compiled the IL code with the incomplete customizations are those now in the model store database and no longer isolated to user A's development enviroment?

2) What is the best way of managing the release of customizations where some customizations within a model are still in development and cannot be moved to production? How are you guys dealing with this?

Thanks,

Dale

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Klaas Deforche Profile Picture
    2,433 on at

    Hi Dale,

    I will explain how we work, that might give you some ideas.

    1. Development

    Every developer has their own local AX environment (one per customer they have to work on). This is because when you work on the same AOS and you debug CIL, the AOS hangs so other people cannot work while you do that.

    We use TFS for version control, so we check in our code and it is stored on TFS.

    2. Builds

    We have setup up a daily build that get all sources from TFS (so everything that is checked in), creates a model for it (actually 2 models, one with the code and one with the label file) and deployes it on the TST environment.

    Our method (currently) is: We have setup an AOS specially for building, this synchronizes with TFS and starts a full compile and full CIL overnight. When this is ok, the models are exported and imported in TST, where an other full compile and CIL is done. In the morning, all new code is available in the TST environment.

    This is all don in command line scripts and using a AXClient, but we are in the process of migrating to TFS Builds using the build scripts developed by Joris: dynamicsaxbuild.codeplex.com.

    3. Release to the customer

    You always (always!) release using models. This is the way code get to the customer site. Models are similar to aod files (layers). Never ever import xpo to deploy code because you cannot possibly track this and it will result in errors. I am strongly against importing xpo's in production, an also against compiling and incremental (or full) CIL compiles. On my projects, no-one is allowed to import xpo's, (and really, no one wants to either :)).

    If you want to deploy to an environment, you should take that environment down and import your model files. Then restart the aos and do a full compile and full cil (a compile can be on level 1 for example, no need to check all best practices). These actions will be automatically presented after you restarted the aos.

    However, usually you don't want production to be unavailable for this long (all these steps will take hours). To solve this, you should set up a "build environment" that is a copy of your production. Simply restore the prod database over this environment before you start importing models. It is also an option to import the modelstore from production into this build environment. The important thing is that the modelstore of these environments is the same. Even better is when all data is the same so you can also detect data synchronization errors beforehand.

    Import your models into this build environment and perform all steps you usually do like a full compile, full cil etc. Then your modelstore is compiled and you can export is from the build environment to a file. On you PROD, create a temporary schema using axutil and import the modelstore from build into that schema. Then stop the prod aos(es), apply the schema and restart the aos(es). During this step PROD will be unavailable but this usually only takes minutes which is usually acceptable.

    After that, prod is available, although depending on what you changed in code, you might have to deploy some reports or enterprise portal controls/pages.

    To sum up:

    - Each developer should have their own local ax environment

    - Use TFS

    - Set up a build

    - Release using models

    - Release to PROD using a modelstore that is build on a copy of production

    - Never ever use XPO and do not compile in PROD, you will have trouble.

    Hope this helps.

  • Verified answer
    Martin Dráb Profile Picture
    239,022 Most Valuable Professional on at

    Just to add a few more details:

    As you can see from Klaas's answer, you shouldn't ever take code for release from development environments. It should be prepared by a build using only the code from version control and nothing else. This is what guarantees that not-checked-in code is never including in a release.

    Although TFS is much more complex than SourceSafe, it's highly recommended. SourceSafe lacks many features and its mainstream supported ended two years ago. You may simplify things by using Visual Studio Online instead of your own installation of TFS.

  • Dale Thornton Profile Picture
    on at

    Thanks for the detailed response Klaas, it has given me a lot of direction!

  • Suggested answer
    Joris dG Profile Picture
    17,780 on at

    Lots of replies already. Let me just add that instead of only moving checked in code, use branching to do feature releases.

  • bankk Profile Picture
    6,611 on at

    This is very enlightening, especially Klass' detailed walk through.

    I'm just getting my feet wet with DAX and have relied on a more experienced person on the team for guidance, and I always assumed there were best practices behind them. We're using XPOs to deploy across the board (including production)! I'm left wondering what other practices we're engaged in are putting us at risk. Nonetheless, thank you for this post. It's given me a lot to consider.

  • Suggested answer
    Joris dG Profile Picture
    17,780 on at

    To Klaas' post, you can find our setup and process on my blog under the "how we do development" series: daxmusings.codecrib.com/.../alm-tfs.html

    I also have recent posts (a series that i have yet to conclude) on automating builds.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans