Version Info not showing up in assembly properties for C++ dll

G

Guest

I'm using VS2005 to build a C++ assembly. I set a Key File in the linker
advanced options for the project so that the assembly would be strong named.
I filled out the data in AssemblyInfo.cpp and built the project. But when I
use explorer to view properties on the assembly, there is not a version tab
as there is on my C# assemblies, so I cannot see the assembly version or file
version or other assembly attributes. The only tabs that show up are
General, Security, and Summary.

What am I missing in the project settings to get the version info to show up
as part of the assembly properties?
 
M

Mattias Sjögren

What am I missing in the project settings to get the version info to show up
as part of the assembly properties?

In C++ you still have to use an old-style Win32 .RES file with a
version resource to specify that information.


Mattias
 
G

Guest

Is there a template somewhere for populating the standard assembly property
fields on the version tab, such as Assembly Version, File Version, Comments,
Company, Internal Name, Language, Product Name, Product Version, etc.?
 
G

Guest

What purpose does the AssemblyInfo.cpp file have? Is there any reason to
even fill out the data in AssemblyInfo.cpp?

Is there a way to map what is in AssemblyInfo to the .RES file?

Is there a way to auto-increment version numbers based on the build time,
like there is in C#?
 
J

Jeffrey Tan[MSFT]

Hi FamilyMan,

If you wanted to specify the information in Version tab in the final
generated assembly, you should righ click the "Resource Files" folder in
the "Solution Explorer"->Add->Resource...->Version to add a new Version
resource into the app.rc file. Then, you may modify the Version in the
app.rc to specify your customized version, company information.

AssemblyInfo.cpp attributes will not be used for this purpose. It will be
added into the final assembly as .Net manifest. You may open ildasm.exe
from the VS2005 command prompt and drag the final assembly into it. Then,
you may double click the MANIFEST to examine its conent. You will see all
the attributes you specified in the AssemblyInfo.cpp.

In C#, AssemblyInfo.cs attributes will be both added into the final
assembly manifest and be used as the Version tab in final assembly. I am
not sure why there is the difference here. I will talk with some other
C++/CLI experts to understand the difference.

I will get back to you ASAP. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

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://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jeffrey Tan[MSFT]

Hi FamilyMan,

Glad to see my reply makes sense to you.

I have discussed this issue with some other experts.

Traditionally, C/C++ programs have used a resource to identify their
version information in the ¡°Version tab¡± as we added Version into the RC
file. Meanwhile, the AssemblyInfo.cpp is a relatively recent addition. In
addition, the two values serve ever so slightly different purposes from an
unmanaged and managed perspective. The Manifest version information is used
for assembly referencing; the version tab can be shared across modules as a
ship version information.

Standard C++ method for adding items to the file properties would be using
unmanaged resources; it is the C# compiler that does more work to add to
the file Version tabpage.

Hope this helps. Anyway, if you need further help, please feel free to tell
me, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

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://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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