In .NET c# 3.5 I have a console application (A) that references several assemblies(X, Y, Z).
How can I get the version information of the loaded assemblies at run time?
I can use reflection to get the info on the currently executing assembly like this
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()
but not the loaded assemblies. Thanks for your help!
JP’s answer will give you all of the assemblies in the AppDomain. If you only want the assemblies that your current assembly references directly, you can use:
That will give you the names, including version information.