By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,491 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,491 IT Pros & Developers. It's quick & easy.

Creating assembly from multiple files at runtime

P: n/a
I need to create assembly at runtime from multiple pre-compiled obj and cs
files embedded into
resource file. I have found only samples which create assembly from single
file like

Microsoft.CSharp.CSharpCodeProvider provider = new
Microsoft.CSharp.CSharpCodeProvider
(new Dictionary<string, string>() { { "CompilerVersion",
"v3.5" } });

CompilerParameters compilerParameters = new CompilerParameters {

GenerateInMemory = true };

CompilerResults compilerResults =
provider.CompileAssemblyFromSource(compilerParamet ers, code);
return compilerResults.CompiledAssembly;
How to create assembly from multiple files ?

Andrus.
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Apr 18, 2:03 pm, "Andrus" <kobrule...@hot.eewrote:
I need to create assembly at runtime from multiple pre-compiled obj and cs
files embedded into
resource file. I have found only samples which create assembly from single
file like

Microsoft.CSharp.CSharpCodeProvider provider = new
Microsoft.CSharp.CSharpCodeProvider
(new Dictionary<string, string>() { { "CompilerVersion",
"v3.5" } });

CompilerParameters compilerParameters = new CompilerParameters {

GenerateInMemory = true };

CompilerResults compilerResults =
provider.CompileAssemblyFromSource(compilerParamet ers, code);
return compilerResults.CompiledAssembly;

How to create assembly from multiple files ?
See CompileAssemblyFromFile, which takes multiple filenames.

However, they all need to be source files as far as I'm aware - not a
mixture of .cs and .obj files.

Jon
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.