var p = System.Diagnostics. Process.GetProcessesByName("w3wp").First(); List<System.Diagnostics.ProcessModule> modules = new List<System.Diagnostics.ProcessModule>(); foreach (ProcessModule element in p.Modules) { modules.Add(element); } modules.Where(m => m.FileName.ToLower().Contains("oracle.dataaccess.dll")).Select(m => new { FileName = m.FileName, Version = m.FileVersionInfo.ProductVersion }).Dump();
查看,exe加载的dll .
将w3wp改为对应的名称即可.