Geeks With Blogs
Tim Huffam Dotting the I and crossing the T of I.T.

This really very simple, once you know how....

To get the version of the currently running assembly:

System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
System.Reflection.AssemblyName assemblyName = assembly.GetName();
Version assemblyVersion =  assemblyName.Version;

To get the version of the CLR runtime:

Version CLRVersion = Environment.Version;

 

Posted on Tuesday, March 28, 2006 3:14 PM BizTalk , C# .NET , ASP.NET | Back to top


Comments on this post: How to determine assembly and .NET CLR runtime versions at runtime.

# re: How to determine assembly and .NET CLR runtime versions at runtime.
Requesting Gravatar...
Ugh.. it WAS very simple. Took me a good half hour to find someone who actually explained it. Thanks!
Left by David Rutten on Mar 19, 2008 1:00 AM

# re: How to determine assembly and .NET CLR runtime versions at runtime.
Requesting Gravatar...
Okay, how do you get a referenced assembly type?
Left by Rob on Aug 01, 2008 9:12 AM

Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net