11

When you view the properties for a binary file that contains a VERSIONINFO resource, Windows adds a "Version" tab, which displays that information.

Is there a list of which .NET assembly attributes map to which VERSIONINFO fields, so we can control these easily for our .NET assemblies?

CharlesB
  • 86,532
  • 28
  • 194
  • 218
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
  • Here's how the latest C# compiler currently does it: http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis/CvtRes.cs,499 – Glenn Slayden Sep 10 '18 at 01:45

2 Answers2

18

Concerning the "fixed Info":

PRODUCTVERSION and FILEVERSION are set from [AssemblyInformationalVersion] and [AssemblyFileVersion] respectively.

FILEOS, FILETYPE are most likely set by the compiler.

Concerning the Var File Info

[AssemblyCulture] maps to "Translation" (I guess!)

Concerning the String File Info

[AssemblyCompany] maps to "CompanyName"
[AssemblyDescription] maps to "Comments"
[AssemblyFileVersion] maps to "FileVersion"
[AssemblyTitle] maps to "FileDescription"
[AssemblyInformationalVersion] maps to "ProductVersion"
[AssemblyProduct] maps to "ProductName"
[AssemblyCopyright] maps to "LegalCopyright"

I think "InternalName" and "OriginalFile" are set to the name of the DLL or EXE, respectively.

Christian.K
  • 47,778
  • 10
  • 99
  • 143
0

The [AssemblyFileVersion] attribute (among others) does this, I believe - for example:

[assembly:AssemblyFileVersion("1.2.3.4")]

You should be able to find this setting in the default AssemblyInfo.cs file generated by the IDE; if not, declare it yourself (as above).

You might also want to look generally at the "Assembly Information..." dialog in project properties, which provides access to this and others.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
  • 1
    If possible, I want a complete list that, for each entry in VERSIONINFO, shows me which attribute to include. For example, which attribute do I use for VERSIONINFO's Comments field? – Roger Lipscombe Mar 10 '09 at 08:59