16 Apr 2017
| Dynamics CRM Online
| Visual Studio Team Services
| Team Foundation Server
More often than not the custom Dynamics 365 solutions I develop depend on third party solutions to provide additional functionality. Therefore these solutions become a pre-requisite to the successful deployment of my own solution.
In this post I go about updating the
previously setup project, build and release definitions in Visual Studio Team Services (VSTS) in order to enable deployment of third party CRM solutions. Pre-requisites
Project structure and deployment scripts based on
generator-nullfactory-xrm (with a minimum version of at least 1.4.0). A working build and release definitions already setup.
Read more about setting up the project structure and build here:
I start off by adding a solution level folder to hold third party solutions and check-in the changes into source control.
Next, we update the build to ensure that the solutions are included as part of the build drop. I add a
Copy Files task with the following parameters:
I trigger a new build to make sure that the solutions are copied over as part of the build artifacts.
Now that our third-party solutions are included as part of the build drop, its time to deploy them. In this scenario I deploy all the solutions contained within the
I added a new PowerShell task as a precursor to the main solution deployment. I set it as an
inline script with the following body:
Get-ChildItem "..\..\_prereq-solutions\" -Filter *.zip |
.\Deploy-CrmSolution.ps1 -serverUrl "$(sndbxservername)" -username "$(sndbxusername)" -password "$(sndbxpassword)" -externalSolutionFileName $_.FullName -publishChanges -activatePlugins -importAsHoldingSolution:$false
I also set the working folder to the
This script iterates through all the solutions in the folder and attempts to deploy them.
If you have multiple inter-dependent third-party solutions and require them to deployed in particular sequence you can either:
Add additional PowerShell tasks for each of the solutions.
Rename the solutions with a ranking number so that the GetChild function orders and execute them implicitly.
comments powered by Disqus. comments powered by