Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

AssemblyKeyFileAttribute Class

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

For a list of all members of this type, see AssemblyKeyFileAttribute Members.

System.Object
   System.Attribute
      System.Reflection.AssemblyKeyFileAttribute

[Visual Basic]
<AttributeUsage(AttributeTargets.Assembly)>
NotInheritable Public Class AssemblyKeyFileAttribute
   Inherits Attribute
[C#]
[AttributeUsage(AttributeTargets.Assembly)]
public sealed class AssemblyKeyFileAttribute : Attribute
[C++]
[AttributeUsage(AttributeTargets::Assembly)]
public __gc __sealed class AssemblyKeyFileAttribute : public
   Attribute
[JScript]
public
   AttributeUsage(AttributeTargets.Assembly)
class AssemblyKeyFileAttribute extends Attribute

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.

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")].

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

The classes in System.Runtime.CompilerServices are intended for use by compilers only. Do not use them unless you are building a compiler.For more detail, see the specifications for the common language runtime architecture, metadata, Microsoft intermediate language instruction set, file format, and Microsoft intermediate language assembly reference in the "Tool Developers Guide" folder of the SDK.

Requirements

Namespace: System.Reflection

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: Mscorlib (in Mscorlib.dll)

See Also

AssemblyKeyFileAttribute Members | System.Reflection Namespace | Metadata and Self-Describing Components | Compiling to MSIL | Metadata Overview

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.