473,320 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Retriving assembly attribute ??

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).De scription
..ToString

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

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

But Version is not retrive any idea why?

thnaks for your help
regards
serge

Jul 21 '05 #1
1 1340
Serge,
I can get all assembly except the version of it by using:

Version = CType(assAttribute,
System.Reflection.AssemblyVersionAttribute).Versi on.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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: serge calderara | last post by:
Dear all, In my assembly info file I have such kind of default information : <Assembly: AssemblyTitle("")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> Can I add...
0
by: Erick Shuai | last post by:
In my project, I need to use custom attribute on all assemblies. This attribute will implement some non-functional code and I want to use it on assembly scope(AttributeTargets is Assembly). I...
1
by: Russ Green | last post by:
I'm trying to retrieve the version attribute of the current assembly in Console and Service applications. I've tried the following method but it doesn't work for me. Any ideas: ' Return the...
1
by: serge calderara | last post by:
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: ...
0
by: nishi.hirve | last post by:
Hello, I am writing one simple C# .NET application in which I have to use the values retrived from the database. But when I try to retrive value of attribute of type Time without time zone it...
1
by: Andreas Mueller | last post by:
Hi all, I have an attribute class: class MyAttribute : Attribute { public MyAttribute(){ } }
3
by: Dan Holmes | last post by:
If i have Class2 that is inherited by Class1, how can Class1's methods operate on Class2's assembly information? For instance: public class Component { public virtual List<ComponentInfo>...
2
by: Paul | last post by:
Hi, I have experience in Java and C++ but I am rather new to C# and just started learning it. I am using Visual C# 2005 Express Edition and I found that there is a file called "AssemblyInfo.cs",...
7
by: Paul Hadfield | last post by:
Hi, I'm running into one problem with trying to call "Type.GetCustomAttributes(...)" on my reflected code. Basically - I can't trap my own custom attribute - I can only catch / identify system...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.