Installing the xRM CI Framework

In this post I will provide you with the details on how to setup  the xRM CI Framework.

The process is simple and easy. After this stage you will be ready to create your automated builds and deployments.

Framework Download & Installation:

  1. The first step is to download the setup files from the visual studio gallery.
  2. Run the setup which will copy all the required files to the installation directory “C:\Program Files (x86)\Xrm CI Framework”.

Automated Build Template Setup:

  1. The first step is to copy the contents from the installation directory “C:\Program Files (x86)\Xrm CI Framework\CRM 2011\VS 2012\TFS Build Templates” and store them under source control in TFS.
  2. Once the files are under source control, you will need configure your Build Controller to use the custom assemblies required by the template.
  3. Follow this link to perform the two steps above. This is based on TFS online but you can use the same process for TFS on premise.
  4. The final step is to register the Dynamics CRM 2011 Build templates with TFS. Follow this link to register the template by selecting the template from the location in source control from the previous step.
  5. Now you should be ready to create your first Build Definition using the Dynamics CRM 2011 template.

Dynamics CRM PowerShell Cmdlets Setup

  1. Start the PowerShell Console and run the command below.
  2. Import-Module “C:\Program Files (x86)\Xrm CI Framework\CRM 2011\PowerShell Cmdlets\Xrm.Framework.CI.PowerShell.dll”. This will give you access to all the xRM CI Framework PowerShell Cmdlets.
    If you are running this on Windows 7 or 8. You will most probably have PowerShell using .NET 2.0 and encounter some errors. To force PowerShell to use .NET follow this blog.
  3. Create your PowerShell Script using the Cmdlets

This article demonstrated how to setup the xRM CI Framework. In the next blogs i will show you how to configure different types of builds and deployment to suite your specific scenario.


Posted on August 12, 2013, in CRM 2011, xRM CI Framework and tagged , , , , , , , , , . Bookmark the permalink. 10 Comments.

  1. Hi waelhamze

    How can we handle the exporting solution in crm 2013 as while exporting solution it asks for source target version to export which when automated gets the default as 6.1 which is not being accepted by the target.

    How can we handle this?

  2. Hi, Great post. Really helpful.

    I’m running into following issues trying to run command import-module. I’m running Windows 8 and Powershell 4.0. All the depdendent assemblies are present in the correct folder. Your help is appreciated.

    PS C:\Windows\system32> import-module “C:\Program Files (x86)\xRM CI Framework\CRM 2011\PowerShell Cmdlets\Xrm.Fram
    import-module : Could not load file or assembly ‘Microsoft.Xrm.Sdk, Version=, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.
    At line:1 char:1
    + import-module “C:\Program Files (x86)\xRM CI Framework\CRM 2011\PowerShell Cmdle …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand

  1. Pingback: Building CRM Solutions with TFS Build | Wael Hamze

  2. Pingback: Automate your Dynamics CRM Builds and Deployments with PowerShell | Wael Hamze

  3. Pingback: Asynchronous Solution Import in Dynamics CRM 2013 | Wael Hamze

  4. Pingback: How to create an Automated TFS Build for Dynamics CRM Solutions? | Wael Hamze

  5. Pingback: xRM CI Framework is now available | Wael Hamze

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: