I’m writing a project that includes plugins. The plugins are designed as their own class files and compiled into their own DLL, but since they’re all inherited from the same basic class, I put that base class into a “SharedObjects” project that any other project in the solution can import as a project reference and use. For example:
In the SharedObjects project, I have this:
Public MustInherit Class BaseClass
End Class
Each plugin project adds a project reference to the SharedObject project, and then it compiles one class into a DLL:
Public Class Plugin
Inherits SharedObject.BaseClass
End Class
When I view the project output, I have two DLLs – one for the SharedObject project, and another for the plugin. It would be great if that would compile into one DLL that I could move around. Is there any way to specify that the SharedObjects DLL should be compiled into the plugin DLL rather than as a separate external file?
You could use ILMerge to merge two assemblies together.