Lets take a simple example for it !!
Suppose this is our Pre-Update Plugin
This plugin would update the value for lastname field for
the lead record on pre update. It is making use of a
custom function which is there in some other assembly.
The function is a simple function which would replace the
char ‘s’ with ‘m’
If we register the above plugin without putting Calculate class’s assembly in GAC, we would get the following error
“Count not load the file or assembly ‘Calculator’ or one of its dependencies”
Here we need to put the referenced assembly in the GAC,
followed by an IISReset.
Or the other option with us is to use ILMerge tool. Using it we can combine multiple .NET assemblies into one.
Download and find more information about the tool here
Using the following command we can merge multiple assembly into one
ilmerge /keyfile:g.snk Test.dll Calculator.dll /out:ILMergedLibrary.dll
keyfile –> valid key file
Test.dll—> the plugin’s dll
Calculator.dll—> the custom assembly.
ILMergedLibrary.dll –> The resulting assembly.
And register this newly merged assembly.