Retriving assembly attribute ??

  • Thread starter serge calderara
  • 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
 
M

Mattias Sjögren

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
 

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