12 Nov 2016 | Dynamics CRM | Dynamics CRM Online | generator-nullfactory-xrm | Visual Studio Team Services | Team Foundation Server | ALM
This is the second of a three part series in which I walk through setting up a release management strategy for Dynamics CRM.
In first part of the series accomplished the following:
nullfactory-xrm yeoman generator. In this post I describe the steps required for setting up a team build. One of the goals with the generated project structure was to have it work with team builds with the least amount configuration.
Navigate to the Build and Release > Builds from within the VSTS team project.

Create a new build definition using a vanilla Visual Studio template.

If you want to use the artifact from this build as part a release deployment, then we need to explicitly copy the deploy scripts into the artifact staging folder. Let's do this by clicking on the Add Task and selecting Copy Files task and licking the add button.

This explicit copy is required because the Nullfactory.Xrm.Tooling is not designated to build as part of the solution.
Next let's configure the task with the following parameters:
$(build.sourcesdirectory)**/Deploy-*.ps1$(build.artifactstagingdirectory)Copy Deploy Scripts to: $(build.artifactstagingdirectory)
Make sure that the newly added task is set to execute before the Publish Artifact: drop task.
Save and provide the new build a name.

Now let's test it out by queuing a new build.
Once the build is complete, navigate to the artifacts and explore the drop folder to verify that all the required file have been copied .

Congratulations! Now you have team build that builds and packages the Dynamics CRM solution. Go forth and extend the definitions to suit your particular development workflow.
In the next post I will show you how to setup a release management definition and automate deployment to Dynamics CRM environments.
comments powered by Disqus