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.cs — AddDevTunnel(string name, string? tunnelId = null, DevTunnelOptions? options = null).
Three issues:
TunnelId is not a member of DevTunnelOptions. It is a parameter of AddDevTunnel (and a property of DevTunnelResource).
Labels = new[] { "qa", "testing" } assigns a string[] to a List<string>? property, which does not compile.
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.
Page
integrations/devtools/dev-tunnels→ "Configure dev tunnel options" and "Configuration → Dev tunnel options".Source:
dev-tunnels.mdxProblem 1 — C# example does not compile
Verified against
DevTunnelOptions.cs— the members areDescription,AllowAnonymous,Labels(List<string>?), andRegion; there is noTunnelId— andDevTunnelResourceBuilderExtensions.cs—AddDevTunnel(string name, string? tunnelId = null, DevTunnelOptions? options = null).Three issues:
TunnelIdis not a member ofDevTunnelOptions. It is a parameter ofAddDevTunnel(and a property ofDevTunnelResource).Labels = new[] { "qa", "testing" }assigns astring[]to aList<string>?property, which does not compile.builder.AddDevTunnel("qa", options)passes aDevTunnelOptionsinto thestring? tunnelIdpositional parameter.Correct:
Problem 2 — TypeScript example passes an options object the export does not accept
The exported polyglot API is
addDevTunnel(name, tunnelId?, allowAnonymous?, description?, labels?)— fromAddDevTunnelForPolyglot, annotated[AspireExport("addDevTunnel")]inDevTunnelResourceBuilderExtensions.cs. It takes positional parameters, not a{ tunnelId, description, labels, allowAnonymous }object. The documented TypeScript call:does not match the exported signature (and
tunnelIdis not a nested option in either language).Problem 3 — options table omits
RegionThe "Dev tunnel options" table lists only
Description,Labels, andAllowAnonymous, butDevTunnelOptionsalso exposesRegion(DevTunnelRegion?, an enum of ~13 regions). Note that the exported TypeScriptaddDevTunneldoes not surfaceRegion, so if the table documentsRegion, it should note the C#-only scope.Provenance
aspire.dev
release/13.5(dev-tunnels.mdx); aspirerelease/13.5(DevTunnelOptions.cs,DevTunnelResourceBuilderExtensions.cs). Compile behavior confirmed against the 13.5 candidate.