Retriving assembly attribute ??

  • Thread starter Thread starter serge calderara
  • Start date Start date
S

serge calderara

Dear all,

I am retriving the atribute of an assembly by using :

obj = System.Reflection.Assembly.LoadFrom
(sFile).GetCustomAttributes(True)

Then fetching attribute object as folllow:

Description = CType(assAttribute,
System.Reflection.AssemblyDescriptionAttribute).Description
..ToString

I can get all assembly except the version of it by using:

Version = CType(assAttribute,
System.Reflection.AssemblyVersionAttribute).Version.ToStrin
g

But Version is not retrive any idea why?

thnaks for your help
regards
serge
 
Serge,
I can get all assembly except the version of it by using:

Version = CType(assAttribute,
System.Reflection.AssemblyVersionAttribute).Version.ToStrin
g

But Version is not retrive any idea why?

AssemblyVersionAttribute is a pseudo-custom attribute that becomes
part of the assembly name rather than being stored as a regular custom
attribute. You get the assembly version with
Assembly.GetName().Version.



Mattias
 
Back
Top