aspire init command
Este conteúdo não está disponível em sua língua ainda.
aspire init - Initialize Aspire support in an existing solution or create a single-file AppHost.
Synopsis
Section titled “Synopsis”aspire init [options]Description
Section titled “Description”The aspire init command initializes Aspire support in your existing .NET solution or creates a single-file AppHost project. This is useful when you want to add Aspire orchestration capabilities to an existing application without creating an entirely new solution structure.
This command defaults to interactive mode. When executed without any options, the command prompts you for the necessary information. When the --version and --source options are provided, the command runs non-interactive mode.
The command performs the following actions:
- Analyzes your existing solution structure
- Adds the necessary Aspire AppHost project or creates a single-file AppHost
- Installs required Aspire packages
- Sets up the initial configuration for orchestration
Options
Section titled “Options”The following options are available:
-
-s, --sourceThe NuGet source to use for the project templates.
-
-v, --versionThe version of the project templates to use.
-
-?, -h, --helpPrints help and usage documentation for the available commands and options.
-
-d, --debugEnable debug logging to the console, which prints detailed information about what .NET Aspire CLI is doing when a command is run.
-
--wait-for-debuggerWait for a debugger to attach before running a command.
Examples
Section titled “Examples”-
Initialize Aspire support in the current solution interactively:
Aspire CLI aspire init -
Initialize Aspire support using a specific template version:
Aspire CLI aspire init --version 13.0.0 -
Initialize Aspire support from a custom NuGet source:
Aspire CLI aspire init --source https://api.nuget.org/v3/index.json --version 13.0.0