Building CRM Solutions with TFS Build
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.
- Compile your Visual Studio Solution (Plug-ins, Custom Workflows, Silverlight, Dependencies, etc…)
- Run Unit Tests
- Invoke CRM Developer Toolkit CrmPackage project deployment (deploy solution components from source control)
- Publish Customizations
- Update CRM Solution version number from TFS Build number (the part after the ‘_’)
- Export your CRM Solution from a CRM Instance
- Unpack an exported CRM Solution using Solution Packager and update your source control
- Update version number of your unpacked solution stored in source control (“\Other\Solution.xml”)
- Pack your customizations from source control and produce a CRM Solution Package
- Invoke a PowerShell script to further extend the Build and/or deploy your solution and dependencies
- 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.
To visualize the build workflow for Dynamics CRM, below is a Visio diagram showing the main 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.
Posted on August 15, 2013, in CRM 2011, Dynamics CRM, xRM CI Framework and tagged Automated Builds, CI, Continuous Integraiton, crm 2011, crm developer toolkit, Dynamics CRM, PowerShell, TFS, TFS Online, visual studio 2012. Bookmark the permalink. 15 Comments.