This is a migrated thread and some comments may be shown as answers.

[Solved] Version # at runtime?

2 Answers 146 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 12 Mar 2008, 08:28 PM
At runtime, how do I query or log the version of RadControls that is installed and being used? Is there a version # for each type of control, or just one for Prometheus?

Thanks!
Jay

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Mar 2008, 07:33 AM
Hello Jay,

Generally there are no independent versions for the different controls in Telerik.Web.UI.

Here is an example how to get the assembly version:
Assembly TelerikWebUIAssembly = AppDomain.CurrentDomain.GetAssemblies().Where<Assembly>(i => i.FullName.Contains("Telerik.Web.UI")).FirstOrDefault(); 
if (TelerikWebUIAssembly != null
    Response.Write(TelerikWebUIAssembly.GetName().Version); 
 

Other possible solution is to get the assembly for a specific type. Here is an example:
Assembly TelerikWebUIAssembly = Assembly.GetAssembly(typeof(Telerik.Web.UI.RadWebControl)) 
if (TelerikWebUIAssembly != null
   Response.Write(TelerikWebUIAssembly.GetName().Version); 


Regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jay
Top achievements
Rank 1
answered on 13 Mar 2008, 05:32 PM
Isn't there just a simple .Version() method in one of your classes that returns the version string such as "2007.3.1425.35"? The System.Reflection.Assembly approach works (thanks for sending this), but it seems to be an awkward way to get such valuable information (I would think most apps would want to dump this value to a log on every startup to aid in supporting commercial applications). If a simple .Version() does not exist, I would recomend adding this to the API.

Thanks again!!
Tags
General Discussions
Asked by
Jay
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jay
Top achievements
Rank 1
Share this question
or