次の方法で共有


AssemblyKeyFileAttribute クラス

厳密な名前を生成するために使用するキー ペアを格納しているファイルの名前を指定します。

この型のすべてのメンバの一覧については、AssemblyKeyFileAttribute メンバ を参照してください。

System.Object
   System.Attribute
      System.Reflection.AssemblyKeyFileAttribute

<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

スレッドセーフ

この型の public static (Visual Basicでは Shared) のすべてのメンバは、マルチスレッド操作で安全に使用できます。インスタンスのメンバの場合は、スレッドセーフであるとは限りません。

解説

厳密な名前を付けたアセンブリを構築する場合は、この属性または AssemblyKeyNameAttribute のいずれかを指定する必要があります。 AssemblyDelaySignAttribute も指定した場合は、通常このファイルは公開キーだけを格納します。

たとえば、構文は [assembly:AssemblyKeyFileAttribute("myKey.snk")] のようになります。

注意   パスとファイル名は永続化されるため、 AssemblyKeyFileAttribute で使用する文字列に、機密情報を使用しないでください。

System.Runtime.CompilerServices のクラスはコンパイラ専用です。コンパイラをビルドする場合以外は使用しないでください。詳細については、SDK の Tool Developers Guide フォルダで、共通言語ランタイム アーキテクチャ、メタデータ、MSIL (Microsoft Intermediate Language) (MSIL) 命令セット、ファイル形式、MSIL アセンブリ リファレンスの各仕様を参照してください。

必要条件

名前空間: System.Reflection

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

アセンブリ: Mscorlib (Mscorlib.dll 内)

参照

AssemblyKeyFileAttribute メンバ | System.Reflection 名前空間 | メタデータと自己言及的なコンポーネント | MSIL へのコンパイル | メタデータの概要