Skip to content

[WebToolsE2E][Aspire] Running 'aspire new --prerelease' is accepted as a valid command, but creating the Aspire project failed with an error: 'Unhandled exception: System.ArgumentNullException: ArgumentList may not contain null.' #8627

@vmykagapuz

Description

@vmykagapuz

INSTALL STEPS

  1. Clean machine: Win11 x64 24h2 ENU
  2. Install SDK 9.0.202
  3. Add the following:
    -dotnet 9 feed
    -.Net 8 and 9 feed
    -dotnet extension feed
  4. Install the latest Aspire 9.2.0-preview.1 templates
    -dotnet new install Aspire.ProjectTemplates::9.2.0 --force
  5. Run the command using powershell (admin):
    -iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) }"
  6. Install aspire.cli tool
    -dotnet tool install --global aspire.cli --prerelease --source https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspire-289c6b87/nuget/v3/index.json

REPRO STEPS

  1. Open CMD and run commad:
    aspire new --prerelease
  2. Enter the project name > Enter the output path > Project templates version

ACTUAL
The project creation failed with an error:

Unhandled exception: System.ArgumentNullException: ArgumentList may not contain null. (Parameter 'item')
   at System.Diagnostics.Process.Start()
   at Aspire.Cli.DotNetCliRunner.ExecuteAsync(String[] args, IDictionary`2 env, DirectoryInfo workingDirectory, TaskCompletionSource`1 backchannelCompletionSource, Action`3 streamsCallback, CancellationToken cancellationToken) in /_/src/Aspire.Cli/DotNetCliRunner.cs:line 346
   at Aspire.Cli.DotNetCliRunner.NewProjectAsync(String templateName, String name, String outputPath, CancellationToken cancellationToken) in /_/src/Aspire.Cli/DotNetCliRunner.cs:line 279
   at Aspire.Cli.Commands.NewCommand.<>c__DisplayClass8_0.<<ExecuteAsync>b__1>d.MoveNext() in /_/src/Aspire.Cli/Commands/NewCommand.cs:line 167
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Status/Status.cs:line 120
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass32_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 138
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in /_/src/Spectre.Console/Internal/DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync[T](Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 121   at Spectre.Console.Status.StartAsync[T](String status, Func`2 func) in /_/src/Spectre.Console/Live/Status/Status.cs:line 117
   at Aspire.Cli.Commands.NewCommand.ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) in /_/src/Aspire.Cli/Commands/NewCommand.cs:line 161
   at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)

Image

RESULT

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions