TFS BuildParameters file

All,

Where can I find some documentation on the values that should be in the TFS buildParameters.txt file? We are setting up TFS on a system here for just two developers. They will be sharing the AOS for development (I know not the recommended way, but we have to) and we need to provide a model (with incremented version number) and a TFS report on changes back to HQ. Thanks

Regards,

Shawn

The process of Team Foundation Build is defined by XML workflow templates, not by some buildParameters.txt. See Customize your build process template on MSDN to get some idea. If you want to use the same approach in AX, consider Joris’s build actions for AX.

A search engine revealed to me that buildParameters.txt is used by Build and deploy scripts for Microsoft Dynamics AX 2012 script on Script Center - is this what you’re trying to use?

I’m sorry I wasn’t clear. I am trying to use the build and deploy scripts you mentioned. The build script takes the buildparameters.txt file to automate the process. Thanks for your reply.

Download Change management and TFS integration for multi developer projects document from InformationSource. Parameters are described in Build settings section.

Martin,

I downloaded the “Change management and TFS integration for multi developer projects AX2012” and ran into an issue. I set up the folders as it says to do in the section below:

Administrator: Configure version control for Microsoft Dynamics AX development (build computer)

After the TFS server is set up, the administrator needs to configure Microsoft Dynamics AX for version control using TFS. The example in this section illustrates these steps. This section assumes that the administrator has already installed and configured Microsoft Dynamics AX on his or her computer.

In this example, the administrator is setting up version control for an application named AxApplication1 that includes two models: ModelA and ModelB. This example does not use branching.

  1. Create a local application root folder to map to the TFS repository. In this example, create the folder C:\MyTFSProject\AxApplication1.

  2. Create the TFS repository structure on the TFS server. You can use Team Explorer to complete these steps.

  3. Create a project named MyTFSProject*.*

  4. Add and check in the folder named AXApplication1.



Verify before you proceed!



1. You have a TFS central repository structure:







2. The TFS repository is mapped to the local folder:



C:\MyTFSProject\AXApplication1

I can’t tell you when and why you created ABKTESTTFS workspace, nevertheless it’s there and it prevents AX from creating its workspace. Either use another folder, remove ABKTESTTFS workspace or modify it not to point to the same folder.

Workspaces can be changed from Source Control Explorer in Visual Studio.

Workspaces are very important - ensure yourself that you understand them (and other basic concepts of TFS).

Hi Martin,

The ABKTESTTFS workspace gets created when I create the test project in Visual Studio. AX is creating its own workspace when I setup the version control in AX. If I try to use the one that already exists, AX gives me an error. I will try to modify one to see if I can get the two together.

Thanks for your help with this issue. this was dumped on me and I’ve been trying to read as much as I can on the subject. Thank you for your patience.

Shawn

Hi Martin,

After looking through some posts I got the workspace problem out of the way, but now I have another. When I run my build script I get this error:

Exception calling “Save” with “1” argument(s): “Access to the path 'c:\TFSProjects\TFSTest\Models\Model.xml is denied”

I am running the Powershell as administrator and the xml file is in the right place. I can even erase it. What can cause this type of problem?

Shawn

What code does throw the error? Isn’t the file locked by another process?

Hi Martin,

Thanks for reponding to this. This is the code where it happens:

function Set-NextVersion
{
foreach($ModelToBuild in ((Get-ModelsToBuild).GetEnumerator()))
{
$filePath = (Join-Path (Join-Path $ApplicationDir $ModelToBuild.Folder) ‘Model.xml’ )
#checkout
if($w -ne $null)
{
$w.PendEdit($filePath)
}

[xml]$x = Get-Content $filePath
$x.ModelManifest.Version = Get-NextVersion($x.ModelManifest.Version)
$x.save($filePath)
}

When the $x.save is called, it is apparently locked there. When I look through the rest of the script, I don’t see where this file updated beyond this point.

Shawn

I would track what exactly locks the file, if I was you; I can’t know it just from looking at code.

By the way, some people report that Get-Content itself obtains a lock, nevertheless I failed to reproduce it (in Powershell 3).

Thanks Martin, I’ll trace through and see what happens.