Condividi tramite


TFS integration with Microsoft Dynamics AX 2012 and automated scripts for build and deployment

For TFS integration,we have come up with a white paper which details what setup is required for using TFS with AX 2012. The white paper is available on information source -

Change management and TFS integration for multi developer projects

It details steps related to creating and deploying Microsoft Dynamics AX builds on computers connected to a central Microsoft Visual Studio Team Foundation Server (TFS) source control system. The document covers two topologies used by Microsoft Dynamics AX developers: private and shared Application Object Server (AOS) topologies.

Once TFS is setup , it is important to have automated build and deployment process. For this , we have provided powershell scripts.

Build and deploy scripts for Microsoft Dynamics AX 2012

 The scripts provide automation for creation and deployment of builds for Microsoft Dynamics AX 2012. The scripts can be used with TFS providing end to end solution for build and deployment. The script performs tasks like sync, creation of TFS label, combining multiple source XPOs to single XPO, validating if build is healthy, etc. These scripts can also work with non-TFS version control where it provides all functionality except the one related to TFS.

 Following scenarios are covered -

1. Creating a build – A Microsoft Dynamics AX build is created from specific versions of source files (XPO files, Visual Studio projects, and label files) in the TFS central repository. Source files that share a common label constitute a specific build of a Microsoft Dynamics AX model or application. Output of a build would be model file(s).

 2. Deploying a build – Developer(s) should be able to deploy model file(s) (generated from build process or manually) in Ax installation(s).

These scripts require some configuration files and parameters which are explained in detail in the above white paper.

Comments

  • Anonymous
    June 25, 2013
    Scripts have been updated for Microsoft Dynamics AX 2012 R2

  • Anonymous
    June 25, 2013
    Hi Mudit,Those scripts are very useful when deploying to a developer machine.But how do you suggest to deploy to Production? We pbviously can't use the DeployAX script because some pieces of data will be lost.

  • Anonymous
    June 26, 2013
    Hi Mudit,I am new to AX and 1st time implementing AX build automation using above scripts.I got scrpt contents but how to trigger this in TFS 2010, the whitepaper does't details about it.Can you provide some pointer on this, how to trigger and configure script in TFS2010?

  • Anonymous
    June 26, 2013
    Hi,I followed each step mentioned on newly added script by Microsoft(gallery.technet.microsoft.com/.../Build-and-deploy-for-b166c6e4)however whenever trying to get build from powershell command getting following error.Begin: Register-SQLSnapIn: 6/27/2013 4:58:04 PMEnd: Register-SQLSnapIn: 6/27/2013 4:58:05 PMStarting Disable-VCS: 6/27/2013 4:58:05 PMDone Disable-VCS: 6/27/2013 4:58:06 PMSync files 6/27/2013 4:58:06 PMCreating workspace AXBuild_c944b03a-c302-4e89-af6c-dedbfe04418dERROR: *********Exception while mapping TFS workspace.Deleting workspace.ERROR: *********Error occured while building.Starting Enable-VCS: 6/27/2013 4:58:06 PMDone Enable-VCS: 6/27/2013 4:58:06 PMWindows PowerShell Transcript EndEnd time: 20130627165806Waiting for a solution.Regards,Pankaj Srivastava

  • Anonymous
    June 28, 2013
    Hey Pankaj,Can you send build parameters you used. That will help in explaining what might be happening?ThanksPiyush

  • Anonymous
    July 02, 2013
    The comment has been removed

  • Anonymous
    July 03, 2013
    @Pankaj - can you share build parameters with Piyush/me , so that we can help out?

  • Anonymous
    July 08, 2013
    @Rahul: Application Soure Dir should not be already mapped in TFS.Build scripts will map the folder and sync files. Once sync it will unmap. So make sure application folder is not mapped in TFS.

  • Anonymous
    July 15, 2013
    I would always deploy a modelstore and never a model to any environment as this enforces the ID's.  Not doing this will trip you up.  Also, why use combine xpo - is it quicker to do that than force AX to sync back to TFS ?

  • Anonymous
    August 28, 2013
    The CompileVSProjects build file contains a ref to a BuildTasks assembly - where do I find this?? Is it part of the standard AX install?

  • Anonymous
    August 30, 2013
    @Steve: Yes its part of standard install. You will find this in GAC.

  • Anonymous
    September 01, 2013
    Thanks @agrawalpiyush - I was referencing the wrong version.Has anyone used this build script with managed code? The model I generated only contains the dll for a VS project. When it was deployed I got an install error and had to generate a virtual model for my project (this didn't solve the issue though - the code would not compile as there was only a dll in the model)

  • Anonymous
    August 12, 2014
    HiMittalI am new to AX I am doing first build with AX can you please help me understand what info to pass on each parameter. I tried to access link you have provided but it is not workingDetails for the usage of scripts and parameters is available on informationsource.dynamics.com/.../Rfpservicesonline.aspxThxChirag

  • Anonymous
    August 13, 2014
    HiMittalcan you please help me with these error. I am new to AXERROR: *********Error occured while building.ERROR: *********Load : Exception calling "Load" with "1" argument(s): "Access to the path 'F:LMS BuildAXCodeDefinition' is denied."At F:LMS BuildAXBuildBuildScriptscommon.ps1:824 char:21    $Definition.Load <<<< ($LocalProject)   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException   + FullyQualifiedErrorId : DotNetMethodExceptionThxCHere is input file==============Version=0.0.008VCSFilePath=F:LMS BuildAXCodeDefinitionApplicationSourceDir=F:LMS BuildAXCodeHSODropLocation=F:LMS BuildAXBuildV0.0.008CompileAll=TrueCleanupAfterBuild=TrueCompileCIL=TrueTFSIntegration=TrueTFSUrl=http://c1w01144:8100/tfs/tfs01TFSLabelPrefix=AXTFSWorkspace=$/HPFS_MSD_AX_TFS/Branches/Development/AXLabelComments=Test buildSignKey=MsBuildDir=C:WindowsMicrosoft.NETFrameworkv4.0.30319RdlLanguage=NoCleanOnError=True

  • Anonymous
    September 01, 2014
    I agree with you Neil. I would prefer TFS sync on the build server from AX and then export a model store to have consistent object ids between environments.In the word document,  page 13 the script is deleting both models before importing new ones from xpo files created by combinedXpos. In that case does it means object ids will be different every time a new build is executed??Cheers

  • Anonymous
    March 30, 2015
    The document is available as a link at technet.microsoft.com/.../jj713631.aspx  However, the link requires a customer/partner login.

  • Anonymous
    September 14, 2015
    I have an isue in R3 CU8 while generating the build not sure what the problem is, the error does not occur always. The export command works fine, not sure where it fails Error occured while building. Export-AXModel : The pipeline has been stopped. At S:AXBuildsBuildScriptsCoreR3CU8common.ps1:1386 char:41

  •                 $result = Export-AXModel <<<<  -Model $modelName -File $model File -Server $sqlServer -Database $sqlModelDatabase -OutVariable out -Verbose    + CategoryInfo          : OperationStopped: (:) [Export-AXModel], Pipeline   StoppedException    + FullyQualifiedErrorId : The specified image file did not contain a resou   rce section. (Exception from HRESULT: 0x80070714),Microsoft.Dynamics.AX.Fr    amework.Tools.ModelManagement.PowerShell.ExportAXModelCommand
  • Anonymous
    February 17, 2016
    Document link is dead in InformationSource. Please refresh the link.