G
GD
Hi,
The following code gets version number from an executable file. After
getting the version number, I need to delete the file. Since the file is
loaded into memory, the file cannot be deleted without unloading it. The
problem is that Compact Framework doesn't have a unload method. Is there any
work around?
Thanks.
GD
-------------------Sample code-----------------------
Assembly asmExe = Assembly.LoadFrom(AProg.exe);
AssemblyName asmName = asmExe .GetName();
MessageBox.Show(asmName.Version.ToString());
File.Delete(AProg.exe); //Error occurs
The following code gets version number from an executable file. After
getting the version number, I need to delete the file. Since the file is
loaded into memory, the file cannot be deleted without unloading it. The
problem is that Compact Framework doesn't have a unload method. Is there any
work around?
Thanks.
GD
-------------------Sample code-----------------------
Assembly asmExe = Assembly.LoadFrom(AProg.exe);
AssemblyName asmName = asmExe .GetName();
MessageBox.Show(asmName.Version.ToString());
File.Delete(AProg.exe); //Error occurs