Docs: Dev Tunnels "Configure dev tunnel options" examples do not compile; options table omits Region

Open Beginner friendly
#1,465 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
csharp, typescript
Domain
documentation

Research direction

Start with src/frontend/src/content/docs/integrations/devtools/dev-tunnels.mdx and compare its examples with DevTunnelOptions.cs and DevTunnelResourceBuilderExtensions.cs. Update the C# and TypeScript examples to match their documented signatures, and add Region to the options table with its C#-only scope. Done means the examples match the 13.5 APIs and the table covers the available options.

Written by the indexing model from the issue text.

Description

Page

integrations/devtools/dev-tunnels → "Configure dev tunnel options" and "Configuration → Dev tunnel options".

Source: dev-tunnels.mdx

Problem 1 — C# example does not compile
var options = new DevTunnelOptions
{
    TunnelId = "my-tunnel-id",              // not a DevTunnelOptions member
    Description = "QA environment tunnel",
    Labels = new[] { "qa", "testing" },     // string[] not assignable to List<string>?
    AllowAnonymous = false
};

var tunnel = builder.AddDevTunnel("qa", options)   // options bound to `string? tunnelId`
                    .WithReference(web);

Verified against DevTunnelOptions.cs — the members are Description, AllowAnonymous, Labels (List<string>?), and Region; there is no TunnelId — and DevTunnelResourceBuilderExtensions.csAddDevTunnel(string name, string? tunnelId = null, DevTunnelOptions? options = null).

Three issues:

  1. TunnelId is not a member of DevTunnelOptions. It is a parameter of AddDevTunnel (and a property of DevTunnelResource).
  2. Labels = new[] { "qa", "testing" } assigns a string[] to a List<string>? property, which does not compile.
  3. builder.AddDevTunnel("qa", options) passes a DevTunnelOptions into the string? tunnelId positional parameter.

Correct:

var options = new DevTunnelOptions
{
    Description = "QA environment tunnel",
    Labels = ["qa", "testing"],
    AllowAnonymous = false
};

var tunnel = builder.AddDevTunnel("qa", tunnelId: "my-tunnel-id", options: options)
                    .WithReference(web);
Problem 2 — TypeScript example passes an options object the export does not accept

The exported polyglot API is addDevTunnel(name, tunnelId?, allowAnonymous?, description?, labels?) — from AddDevTunnelForPolyglot, annotated [AspireExport("addDevTunnel")] in DevTunnelResourceBuilderExtensions.cs. It takes positional parameters, not a { tunnelId, description, labels, allowAnonymous } object. The documented TypeScript call:

const tunnel = await builder.addDevTunnel("qa", {
    tunnelId: "my-tunnel-id",
    description: "QA environment tunnel",
    labels: ["qa", "testing"],
    allowAnonymous: false,
}).withReference(web);

does not match the exported signature (and tunnelId is not a nested option in either language).

Problem 3 — options table omits Region

The "Dev tunnel options" table lists only Description, Labels, and AllowAnonymous, but DevTunnelOptions also exposes Region (DevTunnelRegion?, an enum of ~13 regions). Note that the exported TypeScript addDevTunnel does not surface Region, so if the table documents Region, it should note the C#-only scope.

Provenance

aspire.dev release/13.5 (dev-tunnels.mdx); aspire release/13.5 (DevTunnelOptions.cs, DevTunnelResourceBuilderExtensions.cs). Compile behavior confirmed against the 13.5 candidate.

Dominant language
MDX
Stars
195
Forks
87
Avg merge
1d 22h
Merged PRs (30d)
73

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/aspire.dev

All issues in microsoft/aspire.dev

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.