1

How does it possible to have all used types of an assemblies used in the project? Let's have a project which uses some other assemblies (uses some types from them). I want iterate all only types (by reflection) which are used in the main project and nothing more. Is it really possible?

Thank you.

Dmitriy
  • 847
  • 17
  • 39
  • 1
    Possible duplicate of [C#: List All Classes in Assembly](https://stackoverflow.com/questions/1315665/c-list-all-classes-in-assembly) – Josie G. Bigler Aug 29 '19 at 18:16
  • 2
    https://stackoverflow.com/questions/1975702/net-reflection-find-used-types gives the basic idea using reflection. It's not easy, but it's doable. It might be easier using Roslyn. See https://stackoverflow.com/questions/29176579/get-a-list-of-referenced-types-within-a-project-with-roslyn and similar questions to get started. – Jim Mischel Aug 29 '19 at 18:38
  • 1
    @Josie G. Bigler Not exactly. So, Let's have 4 assemblies (1 main and 3 auxiliary, included in the main project), each assembly has types I use and I do not use. So, I cannot use Executing or Enty Assemblies (because I'll check whole it - I will iterate through all types of these assemblies, but I don't want to do this) – Dmitriy Aug 29 '19 at 18:41
  • 1
    @Jim Mischel, thank you! I'll check your links! – Dmitriy Aug 29 '19 at 18:41

0 Answers0