I can add custom version strings to a C++ DLL in Visual Studio by editing the .rc file by hand. For example, if I add to the VersionInfo section of the .rc file
<
Expanding on the Khoth's answer, In AssemblyInfo.cs:
You can do:
[assembly: CustomResource("Build Date", "12/12/2012")]
Where CustomResource is defined as:
[AttributeUsage(AttributeTargets.Assembly)]
public class CustomResourceAttribute : Attribute
{
private string the_variable;
public string Variable {get { return the_variable; }}
private string the_value;
public string Value {get { return the_value; }}
public CustomResourceAttribute(string variable, string value)
{
this.the_variable = variable;
this.the_value = value;
}
}
This solution is nice because it gives you the flexibility you need and it does not cause any compiler warnings.
Unfortunately it is not possible to use a DateTime because the values entered in Attributes must be constants, and a DateTime is not a constant.
In AssemblyInfo.cs, you can put:
[assembly: System.Reflection.AssemblyInformationalVersion("whatever you want")]
It's a compiler warning if it's not a number like 1.2.3.4, but I'm fairly sure everything will work.