I have a web application written in C# and running as a dll under IIS.
I also have some common code compiled to a separate assembly (dll). This common code contains a function that returns version information (as below). How can I modify this code so it returns the version information of the web app dll and NOT the common code dll as present ?
...
private static Assembly _assy;
private static void CheckAssemblyInfoLoaded()
{
if (_assy == null)
{
_assy = Assembly.GetCallingAssembly();
}
}
public static string Version
{
get {
CheckAssemblyInfoLoaded();
Version v = _assy.GetName().Version;
return v.ToString();
}
}
...