dynamically-generated-co

Using AssemblyBuilder, how can I make all or any of the referenced assemblies embedded instead of linked in the saved assembly?

自古美人都是妖i 提交于 2019-12-04 20:09:31
I have an executing assembly, which generates another assembly dynamically using AssemblyBuilder. The generated assembly consists of functions which simply test the construction of certain classes in the executing assembly. Since the functions in the generated assembly reference classes in the executing assembly, I want to have the executing assembly embed itself in the assembly it creates. So far, I've only managed to generate an assembly that links to the executing assembly, but not one that embeds it. It's important that I have just one final assembly (.dll). Do I need to embed the assembly