How do I add an existing class to a DLL produced by CodeProvider.CompileAssemblyFromSource?

192 views Asked by At

I am creating a dll using codeProvider.CompileAssemblyFromSource, and passing in my code as a string.

I want the resultant dll to include another class that is already in my code and doesn't change.

ie, instead of this line:

compiledResults = codeProvider.CompileAssemblyFromSource(parameters,myCode);

I want something lie this:

compiledResults = codeProvider.CompileAssemblyFromSource(parameters,myCode, typeof(anotherClass));

Is that possible?

0

There are 0 answers