This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

.NET Framework
.NET 2.0+

Assembly Information

.NET framework assemblies can include a number of assembly attribute values that are shown when viewing the properties of the executable file or DLL. These properties can be set using Visual Studio tools or in the source code.

Viewing Assembly File Properties

Microsoft Windows operating systems allow many properties to be set for files. The available properties vary according to the file type. For .NET assemblies that are compiled to executables or dynamic link libraries (DLL), they include details of the assembly, including the name of the program or library, a description and up to three version numbers. They can also include information about the developer or company that created the software.

To view the properties of an assembly, right-click the file in Windows Explorer and choose "Properties" from the context-sensitive menu that appears. A dialog box similar to that shown below appears.

File Properties Dialog

Changing Assembly Information in Visual Studio

If you use Visual Studio 2005 or later, most of the details can be set using a dialog box. To access the Assembly Information dialog box, open the property pages for the project, select the "Application" tab and click the "Assembly Information..." button.

Assembly Information Dialog

Each of the available assembly values can be edited using the dialog box controls. However, some of the terminology in Visual Studio differs from that shown in the file properties. The table below shows the mappings between the items in the Assembly Information dialog box and those of the file properties.

Assembly InformationFile Properties
ProductProduct Name
TrademarkLegal Trademarks
Assembly VersionAssembly Version
File VersionFile Version

AssemblyInfo.cs File

When you change properties in the Assembly Information dialog box the values are added to the AssemblyInfo.cs file as assembly attributes. If you prefer to work with the code directly, you can open this file from the Properties folder of your project. The content of the file varies slightly between Visual Studio versions but the attributes are the same. For the information in the image above, the attributes are as follows:

[assembly: AssemblyTitle("Assembly Information Sample")]
[assembly: AssemblyDescription("Description of sample software")]
[assembly: AssemblyCompany("BlackWasp")]
[assembly: AssemblyProduct("AssemblyInfoSample")]
[assembly: AssemblyCopyright("Copyright ©2011 BlackWasp")]
[assembly: AssemblyTrademark("BlackWasp™")]
[assembly: AssemblyVersion("")]
[assembly: AssemblyFileVersion("")]
[assembly: NeutralResourcesLanguageAttribute("en-GB")]

NB: These attributes are also available when using Visual Studio 2003 and the .NET framework version 1.1.

AssemblyInformationalVersion Attribute

There are other assembly attributes in addition to those that can be set in the dialog box. One is the AssemblyInformationalVersion value, which changes the Product Version property of the final file. If this attribute is omitted, the Product Version matches the File Version.

[assembly: AssemblyInformationalVersion("")]

For more information on this attribute, see the article, "Windows Forms Application Version Numbers".

27 March 2011