471,317 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

Romoveing dll resorces from application

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
ro*******@yahoo.com
Feb 9 '06 #1
4 981
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.
Feb 9 '06 #2
TPI
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.

Użytkownik "PiotrKolodziej" <pi*************@gmail.com> napisał w wiadomo¶ci
news:40*************************@news.chello.pl...
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.

Feb 9 '06 #3
Are you sure that you call Dispose() method?
It would be much better if you just paste some code here
Feb 9 '06 #4
TPI
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().Mod ules[index of
kod.dll].Dispose();

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

But it's not working.
Thanks
R.J.
Użytkownik "PiotrKolodziej" <pi*************@gmail.com> napisał w wiadomo¶ci
news:de***************************@news.chello.pl. ..
Are you sure that you call Dispose() method?
It would be much better if you just paste some code here

Feb 10 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

33 posts views Thread by aa | last post: by
8 posts views Thread by BMM | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.