Programmatically retrieving AssemblyVersion

M

MattB

I searched around a little and I don;t see how I can get the
AssemblyVersion of the main assembly of my asp.net 1.1 application. Can
anyone point me to an example? I want to be able to display this in the
application. Thanks!

Matt
 
G

Guest

Assembly asm = Assembly.GetExecutingAssembly();
string version= asm.GetName().Version.ToString();
 
R

Rob Meade

...
I searched around a little and I don;t see how I can get the
AssemblyVersion of the main assembly of my asp.net 1.1 application. Can
anyone point me to an example? I want to be able to display this in the
application. Thanks!

Hi Matt,

We do this at work, in our template, at the bottom of our web pages the
application version and our core library version are displayed.

This article might well help you - alas I dont have acces right now to the
code we use - but it should be similar..

http://msdn2.microsoft.com/en-us/library/system.reflection.assembly.aspx

Regards

Rob
 
M

MattB

Peter said:
Assembly asm = Assembly.GetExecutingAssembly();
string version= asm.GetName().Version.ToString();

Thanks (and to you too Rob). That was exactly what I needed!

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top