public static string AssemblyFileVersion(Assembly assembly)
{
// Get all Description attributes on this assembly
object[] attributes = assembly.GetCustomAttributes(typeof(System.Reflection.AssemblyFileVersionAttribute), false);
// If there aren't any Description attributes, return an empty string
if (attributes.Length == 0)
return "";
// If there is a Description attribute, return its value
return ((AssemblyFileVersionAttribute)attributes[0]).Version;
}