// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build
Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion ( "1.0.0.0" )]
[assembly: AssemblyFileVersion ( "1.0.1000.0" )]
Similarly, you can add a section like this to a C++/CLI assembly's
AssemblyInfo.cpp:
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the value or you can default the Revision and Build
Numbers
// by using the '*' as shown below:
[assembly:AssemblyVersionAttribute( "1.0.0.0" )];
[assembly:AssemblyFileVersionAttribute( "1.0.1000.0" )];
Right clicking on the C# DLL in Windows Explorer, choosing "Properties" and
examining "Details" will show this information for the C# DLL, but not the
C++/CLI DLL. I've tried this with both /clr:pure and mixed C++/CLI DLLs.
Can anyone tell me what I'm forgetting to do for the C++/CLI DLLs?
Thanks!
--
Jim Hudson
This issue has been discussed in the link below before:
http://groups.google.com/group/microsoft.public.dotnet.general/browse_thread
/thread/32d5bf8bc6ceadf5/93a288f22fac8926
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.
If you wanted to specify the information in Windows Explorer 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.
Yes, in C#, AssemblyInfo.cs attributes will be both added into the final
assembly manifest and be used as the Version tab in final assembly. This is
because the C# compiler does more work than VC++ compiler. I have original
discussed this with VC dev team, below is the background information:
"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 it helps.
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.