assembly version

  • Thread starter Thread starter Guest
  • Start date Start date
You need to get the AssemblyName object for the assembly. For example, for
the currently executing assembly use:

Version assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version;

To print out the version of every assembly referenced by the main assembly
of you app to this:

foreach(AssemblyName assemblyName in
Assembly.GetEntryAssembly().GetReferencedAssemblies())
{
// Print out the name and version of the assemblies
Console.WriteLine(assemblyName.Name + "\t" + assemblyName.Version);
}


Hope this helps.

Brian Delahunty
Ireland

http://briandela.com/blog
 
Back
Top