how to read the assembly manifest without loading the .dll

前端 未结 6 1376
南旧
南旧 2021-01-05 21:34

Essentially need to read the dependencies programmatically without loading the assembly itself, as then you can\'t unload them

6条回答
  •  借酒劲吻你
    2021-01-05 22:06

    2 solutions come to my mind, although I think there's easier way (which I forgot or don't know :) ):
    1. Load your assemblies using some additional AppDomain that you can create. Unloading whole AddDomain will also unload loaded assemblies (but only those, which were loaded using this AppDomain).
    2. Use some api, for example CCI that allows you to look inside managed dll's without loading it using reflection mechanism.

提交回复
热议问题