Hi, how do I delete an assembly file after application shutdown? This is not as easy as it sounds, because it is used in my default appdomain. For several reasons I cant simply create a new appdomain and put it there, but app domain solution is not really what I'm looking for anyway since this is complicated and I have a hard time juggling around with two of them already. I thought about creating a new process at shutdown which will delete the file I want to delete. But I would need to pass a string file path to that process somehow. In short: am I thinking too complicated? Is there a better solution?
I already tried deleting it after Dispatcher_ShutdownFinished was called, but it's still in use as it appears.
Thanks!
edit: sorry, I think there might be confusion: I mean that I want to delete a .dll file.