AssemblyKeyFileAttribute Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Specifies the name of a file containing the key pair used to generate a strong name.

System..::..Object
  System..::..Attribute
    System.Reflection..::..AssemblyKeyFileAttribute

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

[AttributeUsageAttribute(AttributeTargets::Assembly, AllowMultiple = false)]
public ref class AssemblyKeyFileAttribute sealed : public Attribute

The AssemblyKeyFileAttribute type exposes the following members.

  NameDescription
Public methodAssemblyKeyFileAttributeInitializes a new instance of the AssemblyKeyFileAttribute class with the name of the file containing the key pair to generate a strong name for the assembly being attributed.
Top

  NameDescription
Public propertyKeyFileGets the name of the file containing the key pair used to generate a strong name for the attributed assembly.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

When building a strong-named assembly, the author must supply either this attribute or AssemblyKeyNameAttribute. If AssemblyDelaySignAttribute has also been specified, it is likely that this file will only contain the public key.

An example of the syntax is [assembly:AssemblyKeyFileAttribute("myKey.snk")].

Caution noteCaution

Since the path and file name persist, ensure that the string you use with AssemblyKeyFileAttribute does not contain sensitive information.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: