Romoveing dll resorces from application

  • Thread starter Thread starter TPI
  • Start date Start date
T

TPI

Helo

In my application I'm compiling dll file and this dll is inherit in some
class.
This work good until I try to do this again.
Then I have error that the dll file is used by other process.

In order to do naxt compilation I have to free this file from application.

May some one help me with this?

Robert Janda
(e-mail address removed)
 
Perhaps you should check if you are closing correctly instance of the
program.

Try CTRL+ALT+DEL and check if after first call, you'r program is visible in
the processes list.
 
Helo

The applicton is generatiog kod.cs file, next this kod.cs file is compiling
to kod.dll.
Then I call some object, which inherit kod.dll.
I can do this ones. Next time when aplication compile a kod.cs, I have an
error that kod.dll is used by some other process.
That other process is a current application proces.

All I have to do is to free this process from kod.dll.
And I need some help with this.

Thanks.
Robert Janda.
 
Are you sure that you call Dispose() method?
It would be much better if you just paste some code here
 
Hi

The Application makes kod.cd file.
This is over 6000 line of code.
After that I use:
CodeDomProvider provider = new CSharpCodeProvider();
and so on - as NSDN shows - Ctr+C and Ctr+V -> working fine.
After good compilation I call SYM object
public class SYM : KOD
{
call some function from KOD;
}
Till now working perfect.
But I can not do this again.
I have error that file kod.dll is used and compile kod.cs to kod.dll.
I have to some how free that file from current process.
In order to do this I do:
System.Diagnostics.Process.GetCurrentProcess().Modules[index of
kod.dll].Dispose();

GC.SuppressFinalize(System.Diagnostics.Process.GetCurrentProcess().Modules[i
ndex of kod.dll]);

But it's not working.
Thanks
R.J.
 

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

Back
Top