473,387 Members | 1,569 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,387 software developers and data experts.

A tool to view C++/CLI assembly attributes

Hi,

I have a C++/CLI DLL which I marked with [assembly:
AssemblyVersionAttribute( "1.0.0.0" )] in a cpp file. Is there a standard
tool from Microsoft that takes a .DLL file and displays all the .NET
attributes of the assembly?

Thanks,

John

Sep 4 '08 #1
3 2807
"cristalink" <cr********@noemail.noemailwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi,

I have a C++/CLI DLL which I marked with [assembly:
AssemblyVersionAttribute( "1.0.0.0" )] in a cpp file. Is there a standard
tool from Microsoft that takes a .DLL file and displays all the .NET
attributes of the assembly?
ildasm.exe will do that (aside from anything else it does).
Sep 4 '08 #2
Good morning John. Welcome to Microsoft Newsgroup Support service! My name
is Jialiang Ge [MSFT]. It's my pleasure to work with you on this issue.

As Pavel mentioned, ildasm.exe (MSIL Disassembler) is one standard tool
from Microsoft that can view all the .NET attributes of an assembly. You
can find it in .NET Framework SDK.

MSIL Disassembler (Ildasm.exe)
http://msdn.microsoft.com/en-us/libr...k1(VS.80).aspx

Ildasm.exe Tutorial (this tutorial is for .NET 1.1, but it also works for
.NET 2.0 and later)
http://msdn.microsoft.com/en-us/library/aa309387.aspx

In the menu File->Open of ildasm, we could locate the C++/CLI dll, load it.
Then in the View menu -MetaInfo -Show!, it would display all the
metadata info in the .NET assembly, including our AssemblyVersionAttribute
("1.0.0.0"):

CustomAttribute #7 (0c000043)
-------------------------------------------------------
CustomAttribute Type: 0a000005
CustomAttributeName: System.Reflection.AssemblyVersionAttribute :: instance
void .ctor(class System.String)
Length: 12
Value : 01 00 07 31 2e 30 2e 30 2e 30 00 00 1.0.0.0 <
ctor args: ("1.0.0.0")

One thing to be noticed is that, although most attributes in AssemblyInfo
can be found in the manifest, AssemblyVersionAttribute is an exception.
Compilers emit specific metadata for AssemblyVersionAttribute, rather than
emiting the custom attributes themselves. For more details, see the article:
http://blogs.msdn.com/adam_nathan/ar.../29/56645.aspx

John, please try it and let us know whether it's helpful to you.

Apart from ildasm, I'd like to share some other useful resources with you
to look at whenever you find free time. You might have come across these
before but it is just for your reference.

1. A commonly used tool: .NET Reflector
http://www.red-gate.com/products/reflector/
The original writer of the tool, Lutz Roeder, is a Microsoft engineer. In
the recent days, he declared to transfer the development of the tool to Red
Gate: http://blog.lutzroeder.com/

.NET Reflector can easily disassemble any .NET assembly. You could see the
AssemblyVersionAttribute["1.0.0.0"] by loading the .NET assembly,
right-clicking on the resultant node in reflector, and choose "Disassemble".

2. Assembly Viewer
http://www.codeproject.com/KB/dotnet/asmex.aspx
An open source solution to view the .NET assembly metadata. It contains the
source code to parse a .NET assembly.

3. PEBrowsePro
http://www.smidgeonsoft.prohosting.com/
PEBrowsePro can not only analyze .NET meta, it also does a very good job to
parse native images.

And more...

In addition, if you are interested in how to do the above programmatically
in future, you may want to have a look at this online book:
http://www.vijaymukhi.com/documents/books/metadata/
or refer to the source code in Assembly Viewer
http://www.codeproject.com/KB/dotnet/asmex.aspx

Have a nice day!

Regards,
Jialiang Ge (ji****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Sep 4 '08 #3
Thank you for the replies. Ildasm is OK for me.

Cheers,

John

"cristalink" <cr********@noemail.noemailwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi,

I have a C++/CLI DLL which I marked with [assembly:
AssemblyVersionAttribute( "1.0.0.0" )] in a cpp file. Is there a standard
tool from Microsoft that takes a .DLL file and displays all the .NET
attributes of the assembly?

Thanks,

John
Sep 4 '08 #4

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

Similar topics

1
by: AlexB | last post by:
A windows forms .NET application has various built in attributes like: <Assembly: AssemblyTitle("MyAssembly")> <Assembly: AssemblyDescription("Blahblah")> <Assembly: AssemblyCompany("XYZ")> ...
3
by: tron9901 | last post by:
In .NET Configuration 1.1 - Assembly Cache, there's a link called "View List of Assemblies in the Assembly Cache." I need to look at that information on several Windows 2000 Advanced Servers. Is...
3
by: Madhav Desetty | last post by:
I have a legacy C/C++ header file which I use to set the version for DLLs thru' the .rc files while compiling legacy DLLs every day. I update this header file for every build and would like to use...
2
by: RoveR | last post by:
Hi, I have a couple of assemblies containing ServicedComponents-derived classes which will be registered into the same COM+ Application hence I want them to have the same ApplicationIDAttribute,...
1
by: Edward Mitchell | last post by:
How can I get to see the assembly language listing for the C++ code that is displayed in the debugger. I seems like the VS 6.0 had a tool button that would show the assembly language interspersed...
0
by: jsh02_nova | last post by:
Can anybody point me to a document or provide help concerning the direct correlation to attributes used in the Assembly file that effect the output of the type library when registering a COM...
1
by: Andreas Mueller | last post by:
Hi all, I have an attribute class: class MyAttribute : Attribute { public MyAttribute(){ } }
2
by: prabhupr | last post by:
Hi Folks I was reading this article (http://www.dotnetbips.com/articles/displayarticle.aspx?id=32) on "Custom Attribute", written by Bipin. The only thing I did not understand in this article...
3
by: Bob Altman | last post by:
Hi all, I've inhertied a managed C++ (Visual Studio 2005) application. The project apparently contains no assembly attributes (the kind of stuff that would be in an AssemblyInfo.cs file). How...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.