Quantcast
Channel: Wael Hamze » Dynamics CRM
Viewing all articles
Browse latest Browse all 20

Building CRM Solutions with TFS Build

$
0
0

Using the xRM CI Framework and TFS Build you can easily automate the build of your CRM Solutions.

In this post  will go through the details of the Dynamics CRM TFS Build template “DynamicsCrm2011Template.11.1.xaml” that makes of all this possible. Before I proceed further, a TFS Build template is a workflow that defines the flow and steps of a TFS Build. This is normally implemented using Windows Workflow Foundation. TFS Build allows you provide custom build templates to suite your needs.

The Dynamics CRM 2011 TFS build template extends the default TFS Build template to provide the extra steps required to Build CRM Solutions and implement Continuous Integration.

Below are the high level steps the Dynamics CRM Build will go through. Note that all these steps can be configured using parameters and can be turned on or off to suite your specific scenarios.

  1. Compile your Visual Studio Solution (Plug-ins, Custom Workflows, Silverlight, Dependencies, etc…)
  2. Run Unit Tests
  3. Invoke CRM Developer Toolkit CrmPackage project deployment (deploy solution components from source control)
  4. Publish Customizations
  5. Update CRM Solution version number from TFS Build number (the part after the ‘_’)
  6. Export your CRM Solution from a CRM Instance
  7. Unpack an exported CRM Solution using Solution Packager and update your source control
  8. Update version number of your unpacked solution stored in source control (“\Other\Solution.xml”)
  9. Pack your customizations from source control and produce a CRM Solution Package
  10. Invoke a PowerShell script to further extend the Build and/or deploy your solution and dependencies
  11. Run Integration tests on your selected environment

Using various combinations of the above you can implement different types of builds to suite your needs.

Note that all components required to build your CRM Solution should be either in source control or CRM instance for the Build Template to work correctly.

As I mentioned before all of the above can be configured very easily using the TFS Build user interface inside visual studio. So you can create a new build definition in a matter of minutes.

DynamicsCRMBuildDefinition

To visualize the build workflow for Dynamics CRM, below is a Visio diagram showing the main flow.

Dynamics CRM 2011 TFS Build Template Flow

Dynamics CRM 2011 TFS Build Template Flow

In the coming posts I will go into the details of the different types of Builds you can create and how you can use this template to implement these.

In the meantime you can have a go at creating a build definition using the template after following the setup instructions in my previous post.



Viewing all articles
Browse latest Browse all 20

Trending Articles