要获取执行程序集路径:
using System.IO;
String path= Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().Location);
Run Code Online (Sandbox Code Playgroud)
要获得所有程序集:
DirectoryInfo di= new DirectoryInfo(path);
FileInfo[] fis = di.GetFiles("*.dll");
foreach(FileInfo fis in fls )
//do something
Run Code Online (Sandbox Code Playgroud)