Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of all .NET assemblies programmatically?

I have an application to write dynamic assembly in runtime, so I need to a list of all assemblies in my system like Visual Studio Reference Manager:

Reference Manager

My question is: How to fetch a list of all .NET Assemblies by self .NET languages and without searching a folder files?

Note:
I know I can find any assemblies from:
C:\Windows\assembly\GAC\...
or
C:\Windows\Microsoft.NET\Framework
but I not sure to find that assemblies in all system by this way!
Because I do not have access to these folders on all computers. So my app only through .NET code can fetch the names of these assemblies. And other problem is that the path to this folder on all the computers are not fixed and may vary.

like image 846
Behzad Avatar asked Nov 10 '22 06:11

Behzad


1 Answers

You should really have a look on GAC Manager project on Codeplex :
https://gacmanager.codeplex.com/
It will be really helpful and nice to use for your purpose. On the project page you'll also find a working sample (not tried with .Net 4.6 by me anyway, hope it works well also for this one)

like image 64
AFract Avatar answered Nov 14 '22 22:11

AFract