How can I get the versions of all references items using Reflectio

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

OK so imaginer I have 10 single file assemblies I reference, all with their own version. I want to build a log string which shown the name and version so I can tell what a customer has installed at their site.

How can I do this? So it would say:

System.Data version: 1.0.5000.0
System.Drawing: 1.0.5000.0
InternalAss.DataAccess: 5.43.22
ThirdPartyVendor.Graphing: 2.3.3


Kind Regards,

D.W. Carr
 
hi,
try this one:

Assembly assembly = Assembly.LoadFrom("[assembly
location]");
foreach (AssemblyName name in
assembly.GetReferencedAssemblies())
{
MessageBox.Show(name.Name + ": " +
name.Version);
}
--
gani
http://thedeveloperscorner.com.ph

-----Original Message-----

OK so imaginer I have 10 single file assemblies I
reference, all with their own version. I want to build a
log string which shown the name and version so I can tell
what a customer has installed at their site.
 
Back
Top