Re: Reflection and DirectoryInfo.Delete error



If you are using System.Reflection.Assembly.ReflectionOnlyLoadFile to list
the contents of directory where an assembly is loaded for your application
then you are going to have to unload the assembly loaded from that directory
before attempting to delete the directory. If this is the case then why
would you want to delete the directory.

HTH

Ollie Riches

"goHawkeyes" <linda@xxxxxxxxxxxx> wrote in message
news:1169851300.065267.40710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
After using System.Reflection.Assembly.ReflectionOnlyLoadFile to look
through a directory and inspect versions of files and such I use a
DirectoryInfo.Delete(True) object to delete the directory but it gives
me an unauthorized error. If I do everything the same way but do not
inspect the directory contents with reflection I can delete the
directory. I have tried setting my assembly variable to nothing as
well as force garbage collection yet nothing seems to fix the problem.
Is there a bug here or am I missing something?

Thanks,

AJL



.



Relevant Pages

  • Reflection and DirectoryInfo.Delete error
    ... well as force garbage collection yet nothing seems to fix the problem. ... Is there a bug here or am I missing something? ...
    (microsoft.public.dotnet.framework)
  • A structure question in "portio" sample
    ... what bug it fix ?? ... typedef struct _LOCAL_DEVICE_INFO { ...
    (microsoft.public.development.device.drivers)
  • Re: Experience log off problems on Windows XP SP3
    ... application type warning like that: ... background mode that should clean old registry keys and may be unload ... Is that a sort of workaround to fix my issue or what else? ... Your understanding and assessment of UPHClean service is correct, ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Experience log off problems on Windows XP SP3
    ... application type warning like that: ... background mode that should clean old registry keys and may be unload ... Is that a sort of workaround to fix my issue or what else? ... UPHClean can also be used to find the faulting process, ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Experience log off problems on Windows XP SP3
    ... background mode that should clean old registry keys and may be unload ... "Also,to end a proccess that "hangs" running,when it should'nt, ... Is that a sort of workaround to fix my issue or what else? ... UPHClean service is usually effective and it is the easiest way of correcting the problem. ...
    (microsoft.public.windowsxp.help_and_support)