Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
duncan-g avatar

Add Dotnet Service

  • 1 installs
  • Updated May 18, 2026
  • duncan-g/bootstrapproject

Add a new .NET gRPC service to an Aspire-orchestrated project: scaffold under services, bind on 0.0.0.0, register in the AppHost, and update Envoy if present.

About

Adds a .NET gRPC service to an Aspire project, scaffolding it, wiring AppHost registration, and updating the Envoy proxy when it exists. A developer uses it during or after bootstrap to add a backend service.

  • Scaffolds gRPC service with dynamic Aspire port binding
  • Registers in AppHost and updates Envoy routes post-bootstrap

Add Dotnet Service by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #121 of 153 .NET & C# skills by installs in the Skillselion catalog
  • Data as of Jul 8, 2026 (Skillselion catalog sync)
npx skills add https://github.com/duncan-g/bootstrapproject --skill add-dotnet-service

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedMay 18, 2026
Repositoryduncan-g/bootstrapproject

What it does

Add a new .NET gRPC service to an Aspire-orchestrated project: scaffold under services, bind on 0.0.0.0, register in the AppHost, and update Envoy if present.

Files

SKILL.mdMarkdownGitHub ↗

Add .NET gRPC Service

Adds a single .NET gRPC service to an Aspire-orchestrated project. Works in two contexts:

  • During bootstrap — called by bootstrap-project. Envoy does not

exist yet; the orchestrator creates it later with the full route set.

  • Standalone — called directly on an already-bootstrapped project.

Envoy exists and this skill updates it.

Placeholders

  • «ProjectName» — PascalCase root namespace, detected from the AppHost

.csproj filename (e.g. Nimbus.AppHost.csprojNimbus).

  • «ServiceName» — PascalCase name for this service (e.g. Billing).
  • «servicename» — lowercase folder and Aspire resource name (e.g.

billing).

  • «SERVICENAME» — UPPERCASE form for Envoy env var prefixes (e.g.

BILLING).

Prerequisites

  • apphost/ exists with a working .csproj and Program.cs.
  • services/ directory exists.
  • dotnet CLI is available.

Step 1 — Gather inputs

Ask the user for:

1. Service name — short, lowercase (e.g. billing, notifications). Derive PascalCase and UPPERCASE forms automatically. 2. Envoy route prefix — defaults to /«servicename»/.

Detect «ProjectName» from the AppHost .csproj:

ls apphost/*.csproj

The name before .AppHost.csproj is the project name.

Step 2 — Scaffold the service

dotnet new grpc -n «ProjectName».«ServiceName» -o services/«servicename»
dotnet build services/«servicename»

Per bootstrap-project principle 2: if a flag is rejected, drop it and re-run.

Step 3 — Set RootNamespace

Ensure the .csproj has an explicit <RootNamespace> of «ProjectName».«ServiceName» inside the first <PropertyGroup>:

<RootNamespace>«ProjectName».«ServiceName»</RootNamespace>

This guarantees the generated namespace is «ProjectName».«ServiceName» regardless of folder structure or project name conventions. If the element already exists with the correct value, leave it as-is.

Step 4 — Bind on 0.0.0.0

Update services/«servicename»/Properties/launchSettings.json: set the http profile's applicationUrl to http://0.0.0.0:0. Port 0 lets Aspire assign dynamically. Do not hardcode a port.

Step 5 — Add ProjectReference to AppHost

Add to apphost/«ProjectName».AppHost.csproj inside the <ItemGroup> containing other <ProjectReference> entries:

<ProjectReference Include="../services/«servicename»/«ProjectName».«ServiceName».csproj" />

Step 6 — Register in apphost/Program.cs

Add alongside existing service registrations:

var «servicename» = builder.AddProject<Projects.«ProjectName»_«ServiceName»>("«servicename»");

Dots in the project name become underscores in the source-generated type.

Build to verify:

dotnet build apphost

Step 7 — Update Envoy (post-bootstrap only)

Check whether proxy/envoy.yaml.tmpl exists.

  • File absent — skip this step. The caller (bootstrap-project)

creates Envoy later with the full route set.

  • File presentload `references/update-envoy.md` and follow

it to add the service's route, cluster, entrypoint validation, and AppHost Envoy wiring.

Guardrails

  • Never hardcode ports — Aspire assigns them dynamically.
  • Service folder is lowercase (services/billing/); .csproj and

assembly use PascalCase with the root namespace («ProjectName».Billing).

  • Resource names in Program.cs are short lowercase strings matching

the folder name.

Related skills

.NET & C#backendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.