Click to See Complete Forum and Search --> : Assembly info not in dll


Dark Kai
July 3rd, 2006, 05:36 AM
Hi, I wrote and compiled some code in managed C++ but i do not see the version of the file like those in C# or VB.net. Nothing from the AssemblyInfo.cpp is showing when i right click on the dll file. Are there any settings i need to set in order to have the assembly info written to the dll??

Thanks in advance.

NoHero
July 3rd, 2006, 10:51 AM
The assembly info is just a bunch of attributes. If the IDE does not create them for you have to hardcode them:

// AssemblyInfo.cpp
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;

//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly:AssemblyTitleAttribute("your_project")];
[assembly:AssemblyDescriptionAttribute("")];
[assembly:AssemblyConfigurationAttribute("")];
[assembly:AssemblyCompanyAttribute("")];
[assembly:AssemblyProductAttribute("fdsa")];
[assembly:AssemblyCopyrightAttribute("Copyright (c) 2006")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];

//
// 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.*")];
[assembly:ComVisible(false)];
[assembly:CLSCompliantAttribute(true)];
[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];

Just replace the string literals in the Attribute declarations with the strings you need to fit your project; and/or tweak some parameters.