generator-nullfactory-xrm
v1.7.0
Published
Dynamics CRM / 365 Project Structure Generator
Downloads
32
Maintainers
Readme
generator-nullfactory-xrm
Dynamics CRM / 365 Project Structure Generator
A yeoman generator for scaffolding Solution Packager-compatible Dynamics 365 project structures.
The project structure is built around the Solution Packager (provided as part of the official SDK) and the Microsoft.Xrm.Data.PowerShell module. It facilitates the quick creation of team builds and release strategies with minimal effort and enables you to maintain a single source of truth for your CRM solutions.
Installation
First, install Yeoman and generator-nullfactory-xrm using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-nullfactory-xrm
Then generate your new project:
yo nullfactory-xrm
Execution
Template questions and their purpose:
- Visual Studio solution file name?
The visual studio solution filename.
- Visual Studio project prefix?
The prefix for the projects generated. This can be an organization name or preferred convention.
- Source CRM server url?
This is the source CRM server url. Example:[https://sndbx.crm6.dynamics.com](https://sndbx.crm6.dynamics.com)
- Source CRM solution name?
The name of the CRM solution to be extracted.
- Add *.WebResource project?
Specifies if a new project should be created to manage the web resouces.
- Add *.Plugin project?
Specifies if a new plugin project should be created.
- Add *.Workflow project?
Specifies if a new workflow project should be created
Post Installation Setup
Start off by running the _RunFirst.ps1
powershell script located in the generated root folder. This script would restore and update the packages used by the Nullfactory.Xrm.Tooling
.\_RunFirst.ps1
Next, if you opted to add either a plugin or workflow project, ensure that the assembly is signed with a new key.
Optionally, install the Microsoft.Xrm.Data.PowerShell
powershell module. On a Windows 10 or later, do this by executing the included powershell script Nullfactory.Xrm.Tooling\_Install\Install-Microsoft.Xrm.Data.PowerShell.ps1
or manually running the following command:
Install-Module -Name Microsoft.Xrm.Data.PowerShell -Scope CurrentUser -Force
Even if you skip this step, the sychrnoization PowerShell script would attempt to install it automatically. The PowerShell scripts require a minimum of PowerShell 5.0 and Microsoft.Xrm.Data.PowerShell 2.5.
Install Customised .gitignore
If the underlying repository is git, run the following command to install a customised version of the gitignore file. This file is structured to include the binaries within the Nullfactory.Xrm.Tooling\bin\coretools
folder.
yo nullfactory-xrm:gitignore
Pull the CRM Solution into the Project Structure
Anytime the CRM solution needs to be pulled down into the project structure, execute the script located at Nullfactory.Xrm.Tooling\Scripts\Pull-CrmSolution.Param.ps1
.
Resource Mapping
Edit the mapping file to map to the appropriate resource project. They are located in the Nullfactory.Xrm.Tooling\Mapping
folder.
More information on the structure of the mapping file can be found here
Building the CRM Solution
The repackaging the extracted solution is integrated as a post-build step of the solution class library. Simply build it to output both a managed as well as unmanaged CRM solution package.
Install a YAML based CI Build
Use the following command and prompts in order to generate a tailored YAML CI build file.
yo nullfactory-xrm:cibuild
Currently supports only Visual Studio Team Services.
Source Control, CI Builds and Release Management
More information on source control management, setting up continuous integration builds and automated releases:
- Release Strategy for Dynamics CRM - Part 1 - Preparation
- Release Strategy for Dynamics CRM - Part 2 - Setting Up the Build
- Release Strategy for Dynamics CRM - Part 3 - Setting Up the Release
- Release Strategy for Dynamics CRM - Part 4 - Versioning
- Release Strategy for Dynamics CRM - Part 5 - Deploy Third-Party Solutions
Feedback
Please submit any feature requests or issues found to https://github.com/shanec-/generator-nullfactory-xrm/issues
License
Copyright © Shane Carvalho. Licensed under the GPL-3.0 License.