Zum Inhalt springen

aspire init command

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

aspire init - Initialize Aspire support in an existing solution or create a single-file AppHost.

Aspire CLI
aspire init [options]

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

The following options are available:

  • -s, --source

    The NuGet source to use for the project templates.

  • -v, --version

    The version of the project templates to use.

  • -?, -h, --help

    Prints help and usage documentation for the available commands and options.

  • -d, --debug

    Enable debug logging to the console, which prints detailed information about what .NET Aspire CLI is doing when a command is run.

  • --wait-for-debugger

    Wait for a debugger to attach before running a command.

  • 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
Fragen & AntwortenZusammenarbeitenCommunityDiskutierenAnsehen