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 as a resource? If so, how? I don't want to have to write code to load the embedded assembly dynamically, unless that's the only way. I'm looking for something easy like AssemblyBuilder.EmbedAssembly( GetExecutingAssembly() ).