Querying the current assembly for version info

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

Guest

I'm trying to figure out how to query an assembly (in this case an aspx
code-behind DLL) for its current version (major, minor, build, ...), and
basically expose it as a property...

public string Version
{
get
{
string version;
version = ....; // code to extract version info from assembly
return version;
}
}
 
Nate,

If you have a reference to the assembly in question, you can call the
GetName method, which will return an AssemblyName instance for that
assembly. From there, you can access the Version property to get the
version details of the assembly.

Hope this helps.
 
Back
Top