473,384 Members | 1,854 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,384 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 1345
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.