Skip to content

Execution

Luke Benting edited this page Apr 10, 2019 · 4 revisions

Solution Extraction

The installation of the Nuget package will modify the .csproj file to add tasks into the project build process. When the "Clean" command is run on the project, the ExtractCrmCustomizations.ps1 PowerShell script will be executed using the configuration files that are mentioned on the Installation page to connect to Dynamics and extract the solution files into the "Src" folder of the project.

srcfolder.png

NOTE: It is not recommended to select the 'Include in Project' option for the Src folder or any of its contents, as this will lead to unnecessary modifications to the project file every time a "Clean" is performed. Instead it is recommended to simply use the "Show All Files" button, to show the files. showallfiles.png

The "Src" folder and its contents should be included in Source Control. Every time the "Clean" command is executed, and the changes are synced, a history will be built in Source Control giving more visibility of changes.

Solution Build

When the "Build" command is run on the project, the BuildCrmCustomizations.ps1 PowerShell script will be executed using the configuration files that are previously mentioned and pack the solution files in the "Src" folder into a Dynamics Solution file. There are two different types of Dynamics solution, Managed or Unmanaged. If the Build Configuration in Visual Studio is set to Debug, only the Unmanaged version of the Dynamics solution will be built, if the Build Configuration is set to Release, both Managed and Unmanaged versions will be built.

The built solution files will be output to the project's "bin" folder. Ready to be manually deployed to another environment or used in an automated CI process:

solutionfiles.png

Use in CI Pipeline

As the extensions are for MSBuild, they can be used not only through Visual Studio, but anywhere that MSBuild can be executed, this means that the rebuilding of the solution files can be done and is recommended to be done through a CI pipeline, such as those available in Azure DevOps:

adobuild.png

NOTE: You may need to include the /bin/coretools/ folder and its contents into Source Control for this to work. For git repositories, this would involve editing your git.ignore file.

coretools.png

Clone this wiki locally