CRM Tool of The Week – Solution Packager

R8 has many new exciting features like CRM Mobile and Cross-Browser Support. However, what I have been most anticipating since Convergence 2012 was not a feature from Rollup 8 but one of the tools that will be released in the updated SDK called the Solution Packager. 

What is the Solution Packager?

 The solution packager is a command line tool that lets you pack and unpack a solution zip file. The unpacking goes beyond just unzipping the file into the handful of files contained in a solution. It extracts components at a granular level creating a file for each form, view and web resource.

What is So Great About the Solution Packager?

The Solution Packager offers a new level of code management for Solutions.

Before it was very hard to effectively manage the code changes to your CRM Solutions. You may have been checking your solition files into SVN, so your solution files would be backed up and could easily rollback to previous versions. But it was pretty futile to try and do a diff on two versions of a solution file or try and merge two branches.

Now with the Solutions Packager we can break the big unmanagable solutions files into smaller chunks that are easier to swallow. After unpacking the solutions and comparing them it’s much easier to tell what has changed, so we know to merge them or throw them out.

Downloading the Solution Packager 

The Solution Packager is due to be released in an update to the SDK in the Spring/Summer of 2012. However, I was very happy when I downloaded the Rollup 8 Beta files and saw that one of them was for the Solution Packager.

The Rollup 8 Beta is available through the Connect Website. Take a look at Girish’s article on downloading the beta at . Once you get to the Download screen you will see one of the files you can download is Dynamics CRM Solution Packager.

Using the Solution Packager

The Solution Packager is a command line tool. You will need open the command prompt by going to Start>Run>cmd . Then use the cd command to switch to the directory where you saved the SolutionPackager.exe file. You can then use the commands below to pack or unpack a solution.

Extract Command to unpack a solution

The following commands will Extract the solution zipfile c:\Solutions\ to the folder c:\Solutions\Default_1_0
Full Command
solutionpackager.exe /action:Extract /zipfile:c:\Solutions\ /folder:c:\solutions\Default_1_0
Shorthand Command
solutionpackager.exe /a:Extract /z:c:\Solutions\ /f:c:\solutions\Default_1_0

Pack Command to package a solution back up

The following commands will Package the contents from c:\Solutions\Default_1_0 back into a zipfile called solution zipfile c:\Solutions\
Full Command
solutionpackager.exe /action:Pack /zipfile:c:\Solutions\ /folder:c:\solutions\Default_1_0
Shorthand command
solutionpackager.exe /a:Pack /z:c:\Solutions\ /f:c:\solutions\Default_1_0

Other Command Parameters

There are some additional Optional Parameters you can user including:

  • /packagetype {Unmanaged|Managed|Both}
  • /safe
  • /clobber
  • /errorlevel {Off|Error|Warining|Info|Verbose}
  • /log

A full list of the command line commands is available in the ReadMe document that is part of the download.

Leave a Reply

Your email address will not be published. Required fields are marked *