cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
All
I currently have a plugins architecture implemented such that a directory is enumerated and all DLLs within are loaded with Assembly.LoadFile()
Each assembly is checked to see if it has, as a base class, the plugin base (an abstract class) and if so, the activator is called upon to create an instance.
The problem I have is, seemingly, the DLL is never released until the app is shut down, when is a bit of a kicker because I wanted the DLLs to be replaceable on the fly; a FileSYstemWatcher observes the replacement of DLLs and a reload is performed.
Can anyone tell me how to release the read/write lock on the files so they can be replace,d or an alternate way of loading them that does not lock them for read/write?
I currently have a plugins architecture implemented such that a directory is enumerated and all DLLs within are loaded with Assembly.LoadFile()
Each assembly is checked to see if it has, as a base class, the plugin base (an abstract class) and if so, the activator is called upon to create an instance.
The problem I have is, seemingly, the DLL is never released until the app is shut down, when is a bit of a kicker because I wanted the DLLs to be replaceable on the fly; a FileSYstemWatcher observes the replacement of DLLs and a reload is performed.
Can anyone tell me how to release the read/write lock on the files so they can be replace,d or an alternate way of loading them that does not lock them for read/write?