Updating assemblies in solutions

We got a strange problem today: a solution, which contained plugin steps for a plugin, which is hosted in another manged solution was not importable any more. The import failed due to the fact, that the solution, which contains the plugin assembly, was claimed to be not installed.

This was definitely wrong. The assembly solution was installed, but the plugin was not found.

The reason is the policy, how Microsoft CRM treats assembly versions: if the major or minor version changes, the plugin is considered to be a new plugin. If build or revision number only change, the plugin is considered to be updated (version number in .net have (as far as I know) the format Major.Minor.Build.Revision). So, the plugin steps coming with the solution did not find the matching plugin.

So, if you want updatable plugins in your solution, never change the major and minor version of the assembly containing the plugin.

Even the plugin registrationtool complains while updating an assembly with a changed major/minor version. Do not ignore this error.

See this article (especially here) for details on this topic and special thanks to detective Sven for inquieries on that problem!

 

No comments yet.

Leave a Reply