RootCommand.ExecutableName Proprietà

Definizione

Nome dell'eseguibile attualmente in esecuzione.

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

Valore della proprietà

Commenti

Il nome viene risolto nell'ordine seguente:

  1. Il System.CommandLine.ExecutableName valore letto da AppContext, quando non è presente un punto di ingresso gestito (GetEntryAssembly() restituisce null) , in particolare quando è ospitato come libreria nativa NativeAOT. In questo caso GetCommandLineArgs() riflette il processo host anziché questo componente. Il valore viene generato nelle destinazioni di compilazione dell'app runtimeconfig.jsonSystem.CommandLine e per impostazione predefinita è il nome dell'assembly.
  2. Nome del file (senza estensione) dell'eseguibile attualmente in esecuzione, da GetCommandLineArgs().
  3. Valore System.CommandLine.ExecutableName di AppContext, se il percorso eseguibile non era disponibile.
  4. Valore letterale "app", come fallback finale.

Si applica a