The word assembly is used in several contexts. There is the Assembly class that represents an instance of a compiled assembly. There is the notion of a compiled assembly that contains metadata and IL, and there is the Assembly keyword used to demark assembly-level attributes. You will most commonly find assembly-level attributes in a file named AssemblyInfo.vb , although you may find assembly-level attributes in any module.
Two things are required for assembly-level attributes. The first is that when the attribute is defined, it must have the AttributeTargets.All or AttributeTargets.Assembly enumerated value in the list of arguments used to initialize the AttributeUsageAttribute . The second requirement is that you must use the Assembly keyword followed by a colon ( : ) in the attribute statement. (Refer to the Creating Custom Attributes section later in this chapter for more information on the AttributeUsageAttribute .) The next fragment demonstrates a common assembly-level attribute you will find in the AssemblyInfo.vb file.
<Assembly: AssemblyCompany("Software Conceptions, Inc.")>
The preceding assembly-level attribute adds company information to aid in identifying the originator of the assembly. The value of attributes can be reflected or, as is the case with attributes used to identify code authors, you can use the FileVersionInfo class to retrieve information consistent with what you might expect to find in an About dialog.
The next section demonstrates an example of using assembly-level attributes to create a brief About dialog.