Earlier this year I demonstrated the strategy I use for maintaining CRM solutions in source control. I favor the approach due to its ability to be used in team builds and automated releases. Since my original post, I have created a yeoman generator that allows to quickly scaffold the project structure for new projects. And now, in this series of posts, I will walk you through the steps in setting up a new project, creating a team build finally implementing a release strategy using Visual Studio Team Services.
Release Strategy for Dynamics CRM - Part 1 - Preparation
In order to automate the process we first need to make sure that the solution is maintained in source control.
Visual Studio Team System (VSTS) source control.
Yeoman code generator with the generator-nullfactory-xrm installed globally. Installation instructions can be found here.
While in this particular demo I use a VSTS team project running on top of Git source control along with VSTS Release Management for the deployment, the same steps can be adapted to be used with any other build and release system.
Prepping the Solution
Create a Team Project and select Git as the version control.
Next, sign the the plugins and workflows projects with a new strong key. Use the following command to generate a new key pair.
sn -k key.snk
Next, let's sync up the CRM solution by running the synchronize script located in the Scripts folder in the Nullfactory.Xrm.Tooling project. This script downloads the CRM solution from the remote server and then expand it using the SolutionPackager.exe tool.