run time generated assembly temporary files...

F

felice pollano

Hi all,
I'm generating run time an assembly with the code below:

ICodeCompiler compiler = codeProvider.CreateCompiler();

CompilerParameters parameters = new CompilerParameters();

parameters.GenerateExecutable = false;

parameters.MainClass = "MainClass";

parameters.IncludeDebugInformation = true;

CompilerResults results = compiler.CompileAssemblyFromSource(parameters,

toParse);

So, As you noticed, I did not specified a name for the genrated file, cause I use the assembly in memory.

Unfortunately the framework seems to create a dll with a strange name in my temp directory, for every assembly I compile. Should I delete myself that temporary files when I'm no longer using these assembly ?



Thabks all !
 
W

Wiktor Zychla

parameters.GenerateExecutable = false;
parameters.MainClass = "MainClass";

parameters.IncludeDebugInformation = true;



try to add:

parameters.GenerateInMemory = true;


Regards,

Wiktor Zychla
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top