By Joe Ye
Developers like to create a universal assembly that contains some helper functions. For instance, retrieve all the elements with the same category. So other Revit Plug-ins can refer to this assembly and take advantage of functions in it.
This is a good way to organize modules. Not only external commands can use the helper functions, but also external applications can use it without any problem. There are samples in Revit SDK show this. RevitViewer project can be referred by RoomViewer, ElementViewer samples.
One developer ran into an error that he cannot run the commands in one plug-in. We found the issue is that Revit plug-ins refer to two utility assemblies with the same name. While the content of the utility assemblies are not the same. The later utility assembly cannot be loaded because there is already an assembly with the same name was loaded.
For example, plug-in A and plug-in B both refer to GetCompomentList.dll. While the element returned by GetComponentList.dll for plug-in A is different to GetCompomentList.dll for plug-in B. When loading plug-in A, A's GetComponentList.dll is loaded. When loading plug-in B, it tries to load GetComponentList.dll, and find it was already loaded, so the utility for B was not loaded. Apparently, commands in plug-in B don't run successfully.