Open Sesame! - Dynamics CRM 2011 Solution File

Gayan Perera, 18 October 2010

I like breaking into things to see what they look like on the inside, on a rainy day like today with not much to do I decided to see what the solution export file is made of.

The exported zip file is similar to the Microsoft Office files, inside the zip file there is [Content_Types].xml which is exactly what's in an Office document if you open it up in a tool like WinRAR, even the xml schema is the same, great to see consistency!

Open Sesame! - Dynamics CRM 2011 Solution File 

Next, we have the solution.xml file, it defines the publisher and it's details along with other settings like:

• Is the solution managed
• Schema prefix
• Components (webresources, plugins, plugin steps...etc)

<ImportExportXml version="5.0.9585.8" minimumversion="" languagecode="1033" generatedBy="OnPremise" xmlns:xsi="">

      <Description description="Automatic numbering for built-in and custom entities in Dynamics CRM 2011." languagecode="1033" />


The components:

• 1 = entity
• 61 = web resource files
• 91 = plugin assembly
• 92 = plugin step which is defined in detail inside the customizations.xml file 

      <RootComponent type="1" schemaName="mag_autonumber" />
      <RootComponent type="61" schemaName="mag_autonumber_16x16" />
      <RootComponent type="61" schemaName="mag_autonumber_32x32" />
      <RootComponent type="61" schemaName="mag_autonumber_66x48" />
      <RootComponent type="91" schemaName="Magnetism.AutoNumbering, Version=, Culture=neutral, PublicKeyToken=fe444c1613c40597" />
      <RootComponent type="92" id="{c3acd8ac-8cbf-df11-8af4-00155d031a1b}" />

Onto the customizations.xml file, this is very similar to Dynamics CRM 4.0 customizations.xml file, the major difference is since you're only exporting your solution it'll only include the items belonging to that solution where Dynamics CRM 4.0 would export everything.

Each web resource that was defined in the solution.xml is broken down into more detail in the customizations.xml file. WebResourceType element defines the file type, 7 is a gif, 10 is a ico file. On a side note might be interesting to see what happens when the boolean switches are turned on/off (another post maybe).

      <DisplayName>Auto Number icon 16x16</DisplayName>

    <PluginAssembly FullName="Magnetism.AutoNumbering, Version=, Culture=neutral, PublicKeyToken=fe444c1613c40597" CustomizationLevel="1">
        <PluginType AssemblyQualifiedName="Magnetism.AutoNumbering.NumberMe, Magnetism.AutoNumbering, Version=, Culture=neutral, PublicKeyToken=fe444c1613c40597" Name="Magnetism.AutoNumbering.NumberMe">

IsolationMode is either sandboxed or not, SourceType is where the assembly is stored, in the database, GAC or disk. If you select the database option it stores the assembly inside the exported zip file, in my case inside \\pluginassemblies\solutionname-id\*.dll

I'm surprised that the export file is open, would be nice if it was encrypted to make it harder to peek inside. It looks like obfuscating your plugins/workflows and building in licensing into your add-ons are couple of ways to cover yourself when the Dynamics CRM marketplace opens.