Click here to Skip to main content
16,020,459 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hi all
i want to delete dll file in my c# project im using visual stodio 2008

this is my code

System.IO.File.Delete(Application.StartupPath + @"\oraociei10.dll");


but it gives me that message
Access to the path 'F:...\oraociei10.dll' is denied.

its being used by another program


is there any way to delete file while its being used by another program

or any way to close all process that used the file then delete it in visual stodio 2008
Posted
Updated 19-Aug-10 4:34am
v2

No..there is no other way to delete a file which is used by a process...cause it creates a lock over the file and no process is granted to update, delete or edit the file...
 
Share this answer
 
Comments
marjavic 18-Aug-10 9:04am    
if there is no way to delete it while it's using by a process
is there any way to close any process using the file in visual stodio
then i can delete the file
If the dll is in use by your program, there is nothing you can do.
If it's another program locking that dll, you should close that first.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900