How to get Names of DLLs used by application

前端 未结 6 968
旧巷少年郎
旧巷少年郎 2021-01-11 09:26

I\'m looking the way to read all assemblies (.dlls) used by my app.

In a standard C# project there is \"References\" folder, when it is expanded I can read all lib

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-11 09:56

    If you have an Assembly object, you can call GetReferencedAssemblies() on it to get any references that assembly uses. To get a list of assemblies the currently running project uses, you can use:

    System.Reflection.Assembly.GetExecutingAssembly().GetReferencedAssemblies()
    

提交回复
热议问题