CRM Solution Packager – Quick Look

Visit Website View Our Posts

I recently had the opportunity to evaluate the CRM Solution Packager and what use it could provide in our CRM ALM. Our current process at Rockton Software was to maintain up-to-date versions of our CRM Solution export zip files in TFS and import those during our nightly build.Of course, we also have our source WebResources (html, javascript, etc.) checked in as well.


What is it?

Essentially, this is a simple command-line tool that is used to do two things:

  • Extract a CRM Solution zip file into its individual component files
  • Pack the individual component files back into a CRM solution zip


Why do I care?

Unpacking the individual files provides you visibility into the changes to your CRM Solution in your version control system. Without this tool, you cannot perform a compare on your CRM Solution between versions (since it is a binary zip file and the compare will just say they differ).


So how do I use it?

The solution packager is available in the CRM 2011 SDK under the sdk\bin folder.


Common Arguments:

  • /action: {Extract|Pack}
    • The action to perform, this can be either: Extract a solution .zip file to a folder, or Pack a folder into a .zip file.
    • /zipfile: <file path>
      • The path and name of a CRM Solution .zip file. When extracting this file must exist and will be read from. When packing this will be replaced.
      • /folder: <folder path> The path to a folder. When extracting this folder will be created and populated with component files. when packing this folder must already exist and contain previously extracted component files.

To extract a solution:

solutionpackager.exe /action: Extract /zipfile: <location of unmanaged .zip file> /folder: <folder where the .zip is extracted to>


Here is a sample folder hierarchy after an Extract:

shawn 7-24-13



To pack into a solution:

solutionpackager.exe /action: Pack /zipfile: <location of unmanaged .zip file> /folder: <folder where the .zip is extracted to>


Our Takeaway?

The one thing I did not like when I initially extracted our solution was the fact that it created a WebResources folder with copies of files that we already had checked into TFS elsewhere.


There is an additional argument called /map that addresses this issue. Essentially, it lets you tell the packager when you perform an Extract or Pack go to this alternate location where I already have these files.


We did encounter one additional benefit of leveraging this tool.


We received about a dozen errors on our initial extract that certain files in the CRM Solution were not found in the source folder. These were either files that were no longer being used (but were still in our CRM Solution and needed to be cleaned up) or files that were valid but never checked into TFS.


Overall, this is a very useful tool and much like Rockton Software it makes you work simpler and easier. More detailed instructions for this tool can be found on MSDN here.


Written By Shawn Strayer, Web Developer at Rockton Software, Microsoft Dynamics Add-On Partner.

Show Buttons
Hide Buttons