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)

Version control (TFS) guide

(0) ShareShare
ReportReport
Posted on by

Hi,

I've started to deepen knowledge about VCS(TFS) in AX... To be honest i dont have big expirience with VCS, mostly GIT but the way how VCS working in AX suprised me a lot..

I have several questions:

  1. What is the difference between adding something to Version Control and moving something to model which is version controlled ??
  2. Why even when i have project version controlled i have to add to version controll every element that is added to project ??
  3. What is the difference between "Get Lastest" and "Synchronize" ??
  4. What Forced Synchronize realy do ??
  5. This question perhaps is caused by that i have may AX on virtual machine and open two MorphX window... but... When i "Check Out" something it's automaticly "Check Out" on the other MorphX... If i change something in first MorphX and Save, next change something in secound MorphX and Save i get after "Check In" a info "All of the changes being checked in are edits without content changes or locks. Changes are undone." I don't catch the idea of version control in this case...

I was looking for some nice written tutorial for TFS on AX but i didn't find it... Maybe some sugestions ??

*This post is locked for comments

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

    Edit: I was slow, Crispin has some of the points covered, however read through this too to make sure we did not miss anything.

    1) I do not understand what does "moving something to model" mean, but TFS is working as if each object in your AOT would be exported as an XPO file individually within the currently selected model.

    2) All objects are version controlled in the AOT, not just projects, see previous point.

    3) Get latest is supposed to pull the latest object, equivalent of check out then undo check out. Synchronize only fetches the objects which have been changed in other workspaces since the last time you have synched, or checked out an object.

    4) Forced synchronize will re-import all objects into your AOT for the model you have selected

    5) A TFS repository is global on one VM. The lock on the object is per workspace (VM). Each developer can check out anything in his own workspace, and then if the same object is modified by two of them, if VS cannot automagically resolve the conflicts, the developer will have to do it in a popup window. Check the documentation, has a section about what is a Shared Workspace.

    https://msdn.microsoft.com/en-us/library/aa639568.aspx

    https://mbs.microsoft.com/customersource/northamerica/AX/learning/documentation/white-papers/Change%20Management%20and%20TFS%20Integration%20for%20Multi-Developer%20Projects%20White%20paper

    Joris de Gruyter and Martin Dráb has a couple of nice blog entries, and automation scripts for TFS and Builds. You can easily find their blogs and articles around TFS.

  • Suggested answer
    Community Member Profile Picture
    on at

    I'm no expert on this; but had the exact same questions myself / come from a similar (i.e. software developer, but not on AX) background, so hopefully my version of the answers will add something on those received to date...

    > 1. What is the difference between adding something to Version Control and moving something to model which is version controlled ??

    A model is a way of grouping objects within a layer / allowing different vendors to segregate their code from one another's.  You can use models for other purposes (i.e. any time you want a distinct group of objects to be handled separately); but most companies just have one model for their own code; then other models from third party add-ons. 

    When you add a model to version control, you create a folder containing that model into which its model manifest file is exported (a summary of that model's properties), and XPOs for all elements within that model.  Additionally the model is added to your Definitions\VCSDef.xml file.

    When you add a new item, its XPO does not appear in the model's folder (repository) created above; the object only exists on the developer's instance's _Model database.  To get the code onto the file system (i.e. in the model's repository), you have to select Add to Version Control.  

    i.e. Being part of a version controlled model does not mean being under version control (sadly).

    > 2. Why even when i have project version controlled i have to add to version controll every element that is added to project ??

    I agree with you; it would be nice if everything was just included under version control by default; or at least to adopt an opt-out rather than opt-in policy for anyone who's configured version control.  

    For me even stuff I can't touch, like SYS, SYP, and third party code would be great to include in version control, since I can then reap the benefits of this after patching / when trying to figure out what's changed, regardless of who changed it.

    FYI: people have created jobs to help find stuff that's not under version control (I've not yet tried either of these for myself):

    - http://blog.slcconsulting.us/2013/05/objects-not-in-version-control-ax-2012/
    - http://www.spartid.com/2015/11/10/ax-2012-objects-not-added-to-version-control/

    > 3. What is the difference between "Get Lastest" and "Synchronize" ??

    Get latest pulls the current (latest) version of the selected object back from your VCS server.

    Synchronize pushes any pending check-ins up to the server, then pulls the latest version of all AOT objects in the current layer & selected model (i.e. which you're prompted to select after selecting Synchronize).  This does not impact those objects which you have checked out; so it won't break any work-in progress.

    > 4. What Forced Synchronize really do ??

    This is the same as Synchronize; only it will also overwrite checked out objects with code from the server; so you risk losing changes (which may be good if you hadn't been aware of those changes / aren't working on those now).

    NB: Even with FORCE you may not get the latest version of everything.  See https://ax-dynamics.com/article/resolving-tfs-synchronisation-issues-in-ax-2012 for more info.

    I've not yet found a nice solution to just sync everything; i.e. all elements in all models under version control in all layers.

    > 5. This question perhaps is caused by that i have may AX on virtual machine and open two MorphX window... but... When i "Check Out" something it's automaticly "Check Out" on the other MorphX... If i change something in first MorphX and Save, next change something in secound MorphX and Save i get after "Check In" a info "All of the changes being checked in are edits without content changes or locks. Changes are undone." I don't catch the idea of version control in this case...

    Not sure I can add any value here since I've not seen this.

    I would check; are both windows open on the same AX instance / by the same user / under the same session / using the same repository / managed in the same workspace?  If you can be specific on those points it may help others provide more relevant answers to your exact scenario.

     

     

     

     

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