What is the practical use of the AssemblyTitle
attribute? MSDN says that it specifies a description for an assembly and that the assembly title is a friendly name which can include spaces.
Visual Studio asks for the assembly name in the properties window of the project along with the default namespace. There is an AssemblyName
attribute but it describes an assembly's unique identity in full (i.e., culture, etc.). I don't see how AssemblyTitle
differs from AssemblyProduct
.
I used the IL Disassembler to see how Microsoft uses AssemblyTitle
. I discovered that in mscorlib.dll, AssemblyTitle
, AssemblyProduct
and AssemblyDefaultAlias
are all set to "mscorlib.dll"
.
In conclusion, what I really would like to see are practical examples of the use of AssemblyTitle
.
Assembly attributes are values that provide information about an assembly. The attributes are divided into the following sets of information: Assembly identity attributes. Informational attributes.
Apply attributes at the assembly levelWhen this attribute is applied, the string "My Assembly" is placed in the assembly manifest in the metadata portion of the file. You can view the attribute either by using the MSIL Disassembler (Ildasm.exe) or by creating a custom program to retrieve the attribute.
There are three types of assemblies: Private assemblies. Shared assemblies. Satellite assemblies.
Identity. An assembly's identity includes its simple name (also called its weak name), a version number, an optional culture if the assembly contains localized resources, and an optional public key used to guarantee name uniqueness and to "protect" the name from unwanted reuse. Contents.
[AssemblyTitle] is a pretty big deal, it is directly visible when you right-click on the assembly and use Properties + Details.
An example to make it more visible. Let's start with this AssemblyInfo.cs file:
[assembly: AssemblyTitle("AssemblyTitle")] [assembly: AssemblyDescription("AssemblyDescription")] [assembly: AssemblyConfiguration("AssemblyConfiguration")] [assembly: AssemblyCompany("AssemblyCompany")] [assembly: AssemblyProduct("AssemblyProduct")] [assembly: AssemblyCopyright("AssemblyCopyright")] [assembly: AssemblyTrademark("AssemblyTrademark")] [assembly: AssemblyCulture("")] [assembly: Guid("7da36bdf-39fb-4a4d-b98c-ecefd99b155a")] [assembly: AssemblyVersion("1.2.3.4")] [assembly: AssemblyFileVersion("5.6.7.8")]
And look at the properties of the file:
Some annotations to this:
It is quirky, the Windows group and DevDiv didn't always work together well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With