Skip to content

[docs] Incorrect basic command examples in WithProcessCommand API #1145

@EmilyFeng97

Description

@EmilyFeng97

REGRESSION INFO: New feature on Aspire 13.4

INSTALL STEPS

  1. Clean machine: Win11 x64 25h2 ENU
  2. Install 10.0.300 SDK
  3. Install Aspire CLI 13.4: iex "& { $(irm https://aspire.dev/install.ps1) } -Quality staging"

REPRO STEPS

  1. Open CMD, create a Aspire Starter App (ASP.NET Core/Blazor) project and go to the AppHost folder
    aspire new aspire-starter  --use-redis-cache --name Aspire01
    cd Aspire01/Aspire01.AppHost 
    
  2. Open the AppHost.cs, update and save the code based on aspire-13-4.md
    #pragma warning disable ASPIREPROCESSCOMMAND001
    
    var builder = DistributedApplication.CreateBuilder(args);
    
    builder.AddRedis("cache")
        .WithProcessCommand(
            name: "dotnet-version",
            displayName: "Show .NET version",
            executablePath: "dotnet",
            arguments: ["--version"]);
    
  3. run the project

ACTUAL

  1. Fail to build project with error "error CS1739: The best overload for 'WithProcessCommand' does not have a parameter named 'name'"
    Image
  2. When hovering the mouse over the WithProcessCommand method, the parameter name is commandName, not name.
    Image

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions