Understanding TFS with AX 2012

I can still see some confusion on how AX gets the files from TFS. First of all let me say that while this is an old topic (4 years by now) AX 2012 will still play a major role for a little while (at least until AX7 gets in there). So, let's clear some of the fog.

1. It is well known that when working on a quite large project doing a V(ersion)C(control) Synchronize with Force will most likely fail at some point due to the high number of objects to import and dependencies between them, possible check-ins that renamed objects, etc. So we should look for alternatives to this. I am not saying that this won't work at all, just that I've seen it fail and know it does (also in the whitepaper working with TFS this is mentioned).

2. With this in mind, let's explore some way to do that. One way would be to always keep your instance up2date. This means doing at least a Sync every day or so. While this might work, there are still times when rogue objects might slip away (i.e. not get imported into AX) and will get you into a manual fix it mode.

 3. When this happens (objects missing from AOT) you must first understand the most fundamental item of all: what is AX bringing from TFS to AOT. Let's remember you are working with files


 a) what is a Workspace: the workspace can be defined as a way of identifying your (AX) connection to TFS and holding the state of each file, present in the server's repository, that the client has downloaded. Let's remember, when you connect your AX to TFS you are entering a physical path on your drive. That is what defines your workspace.

 b) Now, you can view the state of each file in your AX workspace by going to Visual Studio, connecting to your workspace (I'm not going to talk how you do that, suppose you know, but if you don't I will follow up in another topic). You have a column named Latest with two values: Yes or No. So, it's the server that knows the state your files.

 c) So, now you understand: when you say to AX, Let us do a V(ersion)C(control) Synchronize, the AX client goes to the server and says get me the files with Latest on No. So, now you download them in your local folder (the path for the workspace) and they are marked on the server with Yes.

 BUT remember, the files are right now only in your local repository, NOT in AOT, yet.
 This is why, if you have a error and AX stops importing them, you do not get your objects in the AOT, and also if you try to do another Sync, you won't get them ... because the server knows you already got them.

 This also applies to VC Get Latest operation. If you already have the object marked as Latest Yes, even though you are thinking to yourself, well let's do another Get Latest just to make sure I have the last definition, you won't get anything.

 This is for now, so I'm not going to talk about what you can do to fix this, this will be presented in a following post.

 So, in the end, please be careful to what the infolog is saying; if you get only a:

Number of failures: 0
Number of Warnings: 0
Have resolvable Warnings: False
Number of Operations: 0
Number of Conflicts: 0

you have not downloaded anything from TFS, and as a result nothing was changed in AOT.

No comments:

Post a Comment