AppContext.BaseDirectory プロパティ

定義

アセンブリを探すためにアセンブリ リゾルバーが使用するベース ディレクトリのファイル パスを取得します。

public:
 static property System::String ^ BaseDirectory { System::String ^ get(); };
public static string BaseDirectory { get; }
member this.BaseDirectory : string
Public Shared ReadOnly Property BaseDirectory As String

プロパティ値

String

アセンブリ リゾルバーがアセンブリのプローブに使用するベース ディレクトリのファイル パス。

注釈

これは、アプリケーションごとのドメイン プロパティです。 その値は、現在の AppDomain.BaseDirectory アプリケーション ドメインのプロパティに対応します。

.NET 5 以降のバージョンでは、バンドルアセンブリの場合、返される値はホスト実行可能ファイルの格納ディレクトリです。

適用対象