
Assembly Identity Attributes
Three attributes, together with a strong name (if applicable), determine the identity of an assembly: name, version, and culture. These attributes form the full name of the assembly and are required when referencing the assembly in code. You can use attributes to set an assembly's version and culture. The compiler or the Assembly Linker (Al.exe) sets the name value when the assembly is created, based on the file containing the assembly manifest.
The following table describes the version and culture attributes.
Assembly identity attribute
|
Description
|
|---|
AssemblyCultureAttribute
|
Enumerated field indicating the culture that the assembly supports. An assembly can also specify culture independence, indicating that it contains the resources for the default culture.
Note:
The runtime treats any assembly that does not have the culture attribute set to null as a satellite assembly. Such assemblies are subject to satellite assembly binding rules. For more information, see
How the Runtime Locates Assemblies.
|
AssemblyFlagsAttribute
|
Value that sets assembly attributes, such as whether the assembly can be run side by side.
|
AssemblyVersionAttribute
|
Numeric value in the format major.minor.build.revision (for example, 2.4.0.0). The common language runtime uses this value to perform binding operations in strong-named assemblies.
Note:
|
The following code example shows how to apply the version and culture attributes to an assembly.
'Set version number for the assembly.
<Assembly:AssemblyVersionAttribute("4.3.2.1")>
'Set culture as German.
<Assembly:AssemblyCultureAttribute("de")>
//Set version number for the assembly.
[assembly:AssemblyVersionAttribute("4.3.2.1")]
//Set culture as German.
[assembly:AssemblyCultureAttribute("de")]