I have a running assembly that dynamically generates another assembly using AssemblyBuilder.
The generated assembly consists of functions that simply check the construction of certain classes in the executing assembly. Since the functions in the generated assembly reference classes are in the execution assembly, I want the execution assembly to be built into the assembly that it creates.
So far, I have managed to create an assembly that refers to the executing assembly, but not to it. It is important that I have only one last build (.dll).
Do I need to embed the assembly as a resource? If so, how? I do not want to write code to load the embedded assembly dynamically, unless that is the only way. I am looking for something simple like AssemblyBuilder.EmbedAssembly (GetExecutingAssembly ()).
source share