views:

52

answers:

1

Is it possible to merge two assemblies at runtime such that, when you iterate over the ExportedTypes, all the types from both original assemblies are returned?

The why:

I use a database migration framework to update my databases. It take a single assembly made up of special classes which defines the modifications made to the database.

I have two databases the are very similar. Many tables are identical, but each has a couple of unique tables. I would like to have a general migration assembly and a specific assembly for each database. But to use it with my framework, I need to stuff the two assemblies into a single one. Is this possible?

+4  A: 

Take a look at ILMerge:

ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly.

Though it only runs in the v2.0 .NET runtime.

ChrisF
I think you beat me by almost a minute, so I'm going to remove my identical answer and upvote yours.
Steven Sudit