Apart from the assembly attributes that have been covered in previous posts, there are still a few.
We are going to give the remaining ones a brief review in this article to make the assembly information story complete. When necessary, the MSDN and a lot of more other useful webs can be consulted for details.
The AssemblyFlagsAttribute specifies a bitwise combination of AssemblyNameFlags for an assembly, describing JIT (just in time) compiler options, whether the assembly is re-targetable, and whether it has a full or tokenized public key.
The AssemblyDefaultAliasAttribute specifies a default alias to be used by referencing assemblies. This value provides a friendly name when the name of the assembly itself is not friendly (such as a GUID value). This value can also be used as a short form of the full assembly name.
When we set a strong name for an assembly, strong name attributes come into play. They have three members.
The AssemblyDelaySignAttribute has a Boolean value to indicate that delay signing is being used.
The AssemblyKeyFileAttribute indicates the name of the file that contains either the public key (if delay signing being used) or both the public and private keys passed as a parameter to the constructor of this attribute.
Please note that the file name is relative to the output file path (the .exe or .dll), not the source file path.
The AssemblyKeyNameAttribute Indicates the key container that contains the key pair passed as a parameter to the constructor of this attribute.
The following code example shows the attributes to apply when using delay signing to create a strong-named assembly with a public key file called myKey.snk.
[assembly:AssemblyKeyFileAttribute("myKey.snk")]
[assembly:AssemblyDelaySignAttribute(true)]
AssemblyInfo Updater of RevitAddinWidget can help review popular assembly information of all available projects in a Visual Studio solution and update the information conveniently and flexibly in a single central place.
Recent Comments