Skip to content
DocsTry Aspire
DocsTry

RuntimeSpec Properties

ClassProperties13 members
Specifies the runtime execution configuration for a language.
CertificateBundleEnvironmentVariableSection titled CertificateBundleEnvironmentVariablenullablestring?
Gets the environment variable that accepts an additional PEM certificate bundle when running an AppHost for this language.
public string? CertificateBundleEnvironmentVariable { get; init; }
When set, the CLI assigns this environment variable a certificate bundle containing the ASP.NET Core development certificate before launching the AppHost in run mode. The variable is not set when publishing the AppHost. The runtime uses the bundle as additional trusted roots for the entire AppHost process, affecting all outbound TLS connections, including connections unrelated to Aspire-managed resources. For example:
CertificateBundleEnvironmentVariable = "NODE_EXTRA_CA_CERTS";
CodeGenLanguageSection titled CodeGenLanguagestring
Gets the code generation language identifier for the generateCode RPC.
public string CodeGenLanguage { get; init; }
DetectionPatternsSection titled DetectionPatternsstring[]
Gets the file patterns used to detect this language (e.g., ["apphost.ts"]).
public string[] DetectionPatterns { get; init; }
Gets the display name for the language (e.g., "TypeScript (Node.js)").
public string DisplayName { get; init; }
Gets the command to execute the AppHost for run.
public CommandSpec Execute { get; init; }
ExtensionLaunchCapabilitySection titled ExtensionLaunchCapabilitynullablestring?
Gets the extension capability required to launch this language via the VS Code extension. When set (e.g., "node"), the CLI will use the extension launcher if the extension reports this capability. When null, the CLI always uses the default process-based launcher.
public string? ExtensionLaunchCapability { get; init; }
InitializeSection titled InitializenullableCommandSpec[]?
Gets the commands to initialize the project environment (e.g., create a virtual environment and install dependencies). Runs once during scaffolding. Null if no initialization is needed.
public CommandSpec[]? Initialize { get; init; }
Gets the command to install dependencies. Null if no dependencies to install.
public CommandSpec? InstallDependencies { get; init; }
Gets the language identifier (e.g., "TypeScript", "Python").
public string Language { get; init; }
MigrationFilesSection titled MigrationFilesnullableDictionary<string, string>
Gets files that must exist in the project directory before execution. If a file in this dictionary is missing, the CLI will create it with the provided content. This supports upgrade scenarios where new runtime requirements are introduced.
public Dictionary<string, string>? MigrationFiles { get; init; }
PreExecuteSection titled PreExecutenullableCommandSpec[]?
Gets the commands to run before executing or publishing the AppHost. Null if no pre-execution validation is needed. Watch-mode validation should be part of RuntimeSpec.WatchExecute when needed.
public CommandSpec[]? PreExecute { get; init; }
Gets the command to execute the AppHost for publish. Null to use Execute with args appended.
public CommandSpec? PublishExecute { get; init; }
Gets the command to execute the AppHost in watch mode. Null if watch mode not supported.
public CommandSpec? WatchExecute { get; init; }