A Q

A Q

  • NA
  • 1
  • 0

How to unlock a dynamically generated assembly once I have used it from within main application?

Aug 21 2009 9:55 AM
Hi, I have created a dynamic assembly at runtime from within main windows application to perform a task. Once I perform a task I want to be able to delete the dynamic assembly from my code without closing my main application. But I cann't delete that assembly because it's locked by the main application. Any ideas how can I do that? I know we can create a separate AppDomain and use ShadowCopying to true to avoid unlocking but in my case its not possible (at least so far) because although that solves this locking issue, but opens up many other security permission problems that the new generated assembly code doesn't have as compared with the main application assembly. So, back to question, how can I unlock an assembly from within another assembly once I am done with it? Thanks, AQ.

Answers (1)