Zayko in the Net

Personal blog of Vitaly Zayko

NAVIGATION - SEARCH

How to get Assembly version string (C#)?

First of all: in this post I'm talking about Assembly version, not its file version which is different thing:

Here you go:

/// <summary>
/// Returns version of the current Assembly
/// </summary>
/// <returns>Version string in format x.x.x.x</returns>
private string GetAppVersion()
{
   return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}

Add comment