Skip to content

Aspire CLI --version --banner crashes with invalid console handle in non-interactive Windows session #17410

@IEvangelist

Description

@IEvangelist

Template

N/A - required CLI workflow command before template processing

Phase

version

Exact failing command(s)

aspire --version --banner --non-interactive --nologo
aspire --version --banner --log-level Debug --non-interactive --nologo

Aspire version

> C:\Users\dapine\.aspire\bin\aspire.exe --version --non-interactive --nologo
--- stdout ---
13.4.0-preview.1.26271.17+b5ce100e0b30660a9e33ba757adf098aad9ffc92

EXIT_CODE=0

Aspire doctor

> aspire doctor --non-interactive --nologo
Checking Aspire environment...

Aspire Environment Check
========================

Aspire
  ✅ Aspire CLI version 13.4.0-preview.1.26271.17 (channel: daily)  

.NET SDK
  ✅ .NET 10.0.204 installed (x64)  

Container Runtime
  ✅ Docker v29.4.3: running (auto-detected (default)) ← active  

Environment
  ✅ HTTPS development certificate is trusted  

Summary: 4 passed, 0 warnings, 0 failed

Aspire CLI Installations
========================

Γò¡ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓò«
Γöé Path                                             Γöé Version                                                            Γöé Channel Γöé Route     Γöé PATH status Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé C:\Users\dapine\.aspire\bin\aspire.exe (current) Γöé 13.4.0-preview.1.26271.17+b5ce100e0b30660a9e33ba757adf098aad9ffc92 Γöé daily   Γöé (unknown) Γöé active      Γöé
Γò░ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓò»
EXIT_CODE=0

Last ~200 lines of relevant log

> aspire --version --banner --log-level Debug --non-interactive --nologo
[07:20:59] [info] Cli: Aspire CLI version: 13.4.0-preview.1.26271.17+b5ce100e0b30660a9e33ba757adf098aad9ffc92
[07:20:59] [info] Cli: Aspire CLI build ID: 13.400.26.27117
[07:20:59] [info] Cli: Working directory: C:\Users\dapine\.copilot
[07:20:59] [info] Cli: Log file: C:\Users\dapine\.aspire\logs\cli_20260523T122059_cee9343a.log
[07:20:59] [info] Cli: CLI process ID: 4332
[07:20:59] [dbug] Features: Feature defaultWatchEnabled = False (default: False)
[07:20:59] [dbug] Features: Feature experimentalPolyglot:go = False (default: False)
[07:20:59] [dbug] Features: Feature experimentalPolyglot:java = False (default: False)
[07:20:59] [dbug] Features: Feature experimentalPolyglot:python = False (default: False)
[07:20:59] [dbug] Features: Feature experimentalPolyglot:rust = False (default: False)
[07:20:59] [dbug] Features: Feature nugetSignatureVerificationEnabled = True (default: True)
[07:20:59] [dbug] Features: Feature showAllTemplates = False (default: False)
[07:20:59] [dbug] Features: Feature showDeprecatedPackages = False (default: False)
[07:20:59] [dbug] Features: Feature stagingChannelEnabled = False (default: False)
[07:20:59] [dbug] Features: Feature updateNotificationsEnabled = True (default: True)
[07:20:59] [info] AuxiliaryBackchannelMonitor: Auxiliary backchannel monitor stopping
Unhandled exception. System.IO.IOException: The handle is invalid.
   at System.ConsolePal.set_CursorVisible(Boolean) + 0xbb
   at Spectre.Console.LiveDisplay.<>c__DisplayClass18_0`1.<<StartAsync>b__0>d.MoveNext() + 0x10a
--- End of stack trace from previous location ---
   at Spectre.Console.DefaultExclusivityMode.<RunAsync>d__3`1.MoveNext() + 0x168
--- End of stack trace from previous location ---
   at Spectre.Console.LiveDisplay.<StartAsync>d__18`1.MoveNext() + 0x71
--- End of stack trace from previous location ---
   at Spectre.Console.LiveDisplay.<StartAsync>d__17.MoveNext() + 0x5e
--- End of stack trace from previous location ---
   at Aspire.Cli.Interaction.BannerService.<DisplayBannerAsync>d__9.MoveNext() + 0x6b
--- End of stack trace from previous location ---
   at Aspire.Cli.Program.<DisplayFirstTimeUseNoticeIfNeededAsync>d__17.MoveNext() + 0x6a
--- End of stack trace from previous location ---
   at Aspire.Cli.Program.<Main>d__20.MoveNext() + 0x60e
--- End of stack trace from previous location ---
   at Aspire.Cli.Program.<Main>(String[] args) + 0x28
EXIT_CODE=-1073740791

Root-cause analysis

The daily Windows x64 CLI crashes while rendering the animated banner in a non-interactive PowerShell session where stdout/stderr are redirected. Debug output reaches BannerService.DisplayBannerAsync, then Spectre.Console attempts System.ConsolePal.set_CursorVisible(Boolean) and throws System.IO.IOException: The handle is invalid. The same installation reports healthy in aspire doctor, Docker is running, and aspire --version --non-interactive --nologo succeeds, so this looks isolated to the documented --banner rendering path in redirected/non-interactive console environments.

Docs/API entries consulted

banner-option

Docs URL: https://aspire.dev/reference/cli/banner-option

# Banner Option

**`--banner`**

Display the animated Aspire CLI welcome banner.

non-interactive-option

Docs URL: https://aspire.dev/reference/cli/non-interactive-option

# Non-Interactive Option

**`--non-interactive`**

Run the command in non-interactive mode, disabling all interactive prompts and spinners.

aspire-command

Docs URL: https://aspire.dev/reference/cli/aspire-command

# aspire command

> Learn about the aspire command (the generic driver for the Aspire CLI) and its usage.

## Name

`aspire` - The generic driver for the Aspire CLI.

## Synopsis

To get information about the available commands and the environment:

Aspire CLI

```bash
aspire <command> [options]

Description

The aspire command provides commands for working with Aspire projects. For example, aspire run runs your Aspire AppHost.

Options

The following options are available when aspire is used by itself, without specifying a command. For example, aspire --version.

  • -h, /h

Show help and usage information.

  • -v, --version

Prints the version of the Aspire CLI tool.

  • -l, --log-level <Critical|Debug|Error|Information|None|Trace|Warning>

Set the minimum log level for console output. Use this option to increase diagnostics while troubleshooting or reduce output in scripted runs.

  • --non-interactive

Run the command in non-interactive mode, disabling all interactive prompts and spinners.

  • --nologo

Suppress the startup banner and telemetry notice.

  • --banner

Display the animated Aspire CLI welcome banner.

  • --wait-for-debugger

Wait for a debugger to attach before running a command.

Commands

The following commands are available:
| Command | Status | Function |
| ------------------------------------------
| ------- | ---------------------------------------------------------- |
| aspire add
| Stable | Add a hosting integration to the apphost. |
| aspire init
| Stable | Initialize Aspire in an existing codebase. |
| aspire new
| Sta...


### API reference search
`aspire docs api search "banner" --limit 10 --format Json --non-interactive --nologo` returned no API results, so there was no relevant API entry to cite.
```text
> aspire docs api search banner --limit 10 --format Json --non-interactive --nologo
Loading API documentation...
❌ No API results found for 'banner'. Try different search terms.
EXIT_CODE=0

Smoke-test context

The daily template matrix itself passed for: aspire-empty, aspire-py-starter, aspire-starter, aspire-ts-cs-starter, aspire-ts-empty, and aspire-ts-starter. This issue is for the required version/banner capture step in the smoke workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions