jeudi 1 mars 2018

Is there a way to identify my custom assemblies when scanning all assemblies using c#?

I have an application with multiple projects. Of course, each project create it's own dll. Then we can use AppDomain.CurrentDomain.GetAssemblies().ToList() to get all assemblies to use reflection for many reasons.

The AppDomain.CurrentDomain.GetAssemblies() is going to scan every assembly that exists including the standard assumblies like Microsoft's or packages we pull using Nuget of other dependency management tools. What if I want to only scan only my projects dll not the others?

Is there a way to give my projects a shared type then look for that shared type? Unfortunately my projects don't have a common name schema to scan the name for something that starts-with or ends-with here.





Aucun commentaire:

Enregistrer un commentaire