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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Moving customization between environments. Best practices.

(0) ShareShare
ReportReport
Posted on by

Hi!

I mentioned about this topic in several posts but as you suggested me it's better to gather everything in one place.

Most of you bothered with this problem at the beginning of your AX adventure.

I found many ways to move customization between environments but i dont know which approach is best for particular case.

Suppose that we have recommended in "Deploying customizations across Microsoft Dynamics AX 2012 environments" (DCAMSAX12E ) application life  cycle (DEV's, TEST, STAGE, PROD)... And we use TFS... Everything works on AX 2012 R3 CU11...

Possibilities:

  1. Import/Export *.XPO
  2. TFS
  3. AXUtil export (*.axmodel)
  4. AXUtil exportstore (*.axmodelstore)
  5. https://dynamicsaxadmin.codeplex.com/
  6. https://marketplace.visualstudio.com/items?itemName=SDK4NET.AxBuildTools
  7. https://gallery.technet.microsoft.com/scriptcenter/Build-and-deploy-for-b166c6e4
  8. https://www.visualstudio.com/en-us/docs/release/overview

Now consider various configuration:

DEV's to DEV's: that looks simple with TFS... Every DEV is connected to VCS and sourcecode is shared between DEV's

DEV's to TEST: a little bit harder... TFS or *.XPO's or *.axmodel ?? DCAMSAX12E suggest to delete axmodel and import new one... Is this good way ?? Is this solution good with TFS ?? What about the utilities points 5-8 ??

TEST to STAGE: DCAMSAX12E suggest to initialize STAGE from PROD and import model from TEST to STAGE(without delete)... Is this good way ?? Is this solution good with TFS ?? What about the utilities points 5-8 ??

STAGE  to PROD: DCAMSAX12E suggest to import modelstore from STAGE... Is this good way ?? Is this solution good with TFS ?? What about the utilities points 5-8 ??

Most of my concerns is connected with TFS utility... It would be unwanted to lose advantages of VCS due to wrong synchronization method...

Thank you in advance

HD

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Here is what I do at my current place, it is not yet ideal but is a good starting point:

    Developer's code is ready, it gets manually imported to Test for verification via XPOs. Once functional testing is done, developer checks in the code in his workspace to TFS Dev branch.

    I do the code review and merge/migrate the code from Dev branch to Prod branch (so it only exists in TFS at the moment) on my local computer within Visual Studio Team Explorer.

    I log on to the Build instance that is hooked up against the Prod TFS branch, and do a Version control Synchronize, which fetches the code that has been reviewed and ready to go to Production, and imports it to AX from the repository on it's own, then I close the AX client.

    I start the automated build process (manually, or scheduled) in VS Team Explorer, that relies on the TFS Activity Workflow and some of the publicly available tools made by fellow community members (CodeCrib library), which produces the AXModelStore in the end.

    I release that with a PowerShell script that into our Staging/QA environment for final verification, and after it is marked as ready to go, during the Production maintenance window again we release the modelstore using PowerShell, then do the manual steps (DB synch, AIF ports refresh, update jobs, setup changes, whatsoever required).

    Later on if I have some time, we will change this with the team to have a Build environment separately for Test, which will automatically start the AX client and do a VCS synchronize, then I plan to use either the Release Management that Martin has mentioned to deploy the modelstore to Test, or might go down the PowerShell script route again. Same improvement will be done for release to Staging. I deliberately want to keep the requirement to manually synchronize Prod Build, so I have control as gatekeeper over what is really going out, as a second level verification for the synchronized objects' list.

    Ultimately your Staging/QA and Production environment's code will be identical code/objects-wise, since that is what you have in the modelstore. Their ID's will match, which will make your life easier by not having ID conflicts left and right for your modelstore and SQLDictionary table.

  • lally Profile Picture
    8 on at

    Good post &  explanation by Vilmos.

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    I prefer avoid .xpo files complexly - everything should be in version control, in my opinion.

    If developers work directly in the main branch. they simply check in code and it's automatically picked up by automated builds.

    If you don't want everything going automatically to the build, developers work in a different branch and push code to main when ready. Working with version control and changesets is safer and easier to track than if developers juggle .xpo files, insert something else to version controls than what was tested, unintentionally overwrite each others files and so on.

    Deploying code to a test environment that hasn't been added to version controls and leaving it uncommitted until functional testing is done also pretty very risky to me. Having several pending changes for several work items isn't very practical and leads to errors, because developers often don't split changes correctly to changesets, they may need to work on the same object in several work items and so on.

    I believe that developers should check in changes as soon as they're satisfied with them. From that moment, it's safely stored in TFS and if the DEV machine is lost, it's not a problem. It leads to early integration, merging is easier, building and deploying follow usual processes (build server creates model files for deployment), and so on.

    What I've seen so far, many development teams use .xpo files, but almost always as a workaround of the fact that they have a single branch only. Typically they do it because they don't want to release everything, and they don't realize that their version control can handle that. They have two logical versions of the application - something in development and something in testing, and they can easily model it with branches.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans