How can I obtain the value of AssemblyVersion attribute

  • Thread starter Thread starter Riccardo Fersini
  • Start date Start date
R

Riccardo Fersini

Can someone tell me about this question: "how can I obtain AssemblyVersion
attribute within my VB code in compactframework."

Thanks in advance
 
Riccardo Fersini said:
Can someone tell me about this question: "how can I obtain AssemblyVersion
attribute within my VB code in compactframework."

Use Assembly.FullName.Version.
 
Dear Jon,

I did not understand what you wrote to me.

Can you be more accurate in your response please....

I don't think that your code will work correctly in .net framework neither
in .net compact framework.
 
This should do it:-

add:-

Imports System.Reflection

to the top of your code file, then:-

Assembly.GetExecutingAssembly().GetName().Version.ToString()

This will get you the version of the assembly in which this code is placed.
If you want to get the version of another assembly used in your program look
at the Assembly.Load() method. All of this functionality can be found in the
System.Reflection namespace.

Peter

--
Peter Foot
Windows Embedded MVP

In The Hand
http://www.inthehand.com
Handheld Interactive Reference Guides

Riccardo Fersini said:
Dear Jon,

I did not understand what you wrote to me.

Can you be more accurate in your response please....

I don't think that your code will work correctly in .net framework neither
in .net compact framework.
 
You can use Reflection to do this:

string Version =
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString
();

HTH
Neil
 
Back
Top