Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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.
Inheritance Hierarchy
System. . :: . .Object
System. . :: . .Attribute
System.Reflection..::..AssemblyKeyFileAttribute
Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
<AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple := False)> _
Public NotInheritable Class AssemblyKeyFileAttribute _
Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = false)]
public sealed class AssemblyKeyFileAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Assembly, AllowMultiple = false)]
public ref class AssemblyKeyFileAttribute sealed : public Attribute
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = false)>]
type AssemblyKeyFileAttribute =
class
inherit Attribute
end
public final class AssemblyKeyFileAttribute extends Attribute
The AssemblyKeyFileAttribute type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
AssemblyKeyFileAttribute | Initializes 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
Properties
Name | Description | |
---|---|---|
![]() |
KeyFile | Gets the name of the file containing the key pair used to generate a strong name for the attributed assembly. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
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")].
Warning
Since the path and file name persist, ensure that the string you use with AssemblyKeyFileAttribute does not contain sensitive information.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.