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

[Solved] Identify Telerik Version/Build # in code

2 Answers 579 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Todd A
Top achievements
Rank 1
Todd A asked on 07 Jan 2010, 11:33 PM
I have a web page where I display the versions of dlls which are deployed in our different environments -- how do I get the version/build # in c# for the telerik web.ui dll.

Thanks,
Todd.

2 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 08 Jan 2010, 07:34 AM
Hello Todd,

Here is some sample code you can use to get the current Telerik version:

System.Version ver = typeof(Telerik.Web.UI.RadMenu).Assembly.GetName().Version;
string verString = ver.ToString(4);
//verString contains for example "2009.3.1208.35"

The code assumes that the Telerik.Web.UI assembly is loaded in the current web application. If it is not, then you can use the Assembly.Load() or Assembly.LoadFile() methods from System.Reflection to load it and then get the version in the same manner as above using Assembly.GetName().Version.

Regards,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Todd A
Top achievements
Rank 1
answered on 08 Jan 2010, 03:39 PM
Perfect. Thanks.
Tags
General Discussions
Asked by
Todd A
Top achievements
Rank 1
Answers by
Lini
Telerik team
Todd A
Top achievements
Rank 1
Share this question
or