Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
43d36de
Initial plan
Copilot Mar 3, 2026
75dfc4e
Add polyglot TypeScript apphost files for .NET Aspire samples
Copilot Mar 3, 2026
47fe94b
Add polyglot apphost.ts TypeScript conversions for all samples with g…
Copilot Mar 3, 2026
781e1e0
Add aspire add setup commands and use package APIs in apphost.ts files
Copilot Mar 3, 2026
8e2710f
Address code review: add error handling, clarifying notes, and format…
Copilot Mar 3, 2026
69126ed
Document that gap analysis is unvalidated; staging CLI required for a…
Copilot Mar 3, 2026
66f81fe
Document staging CLI requirement and sandbox limitation
Copilot Mar 3, 2026
4718ce1
Remove accidentally committed .aspire/settings.json; restore nuget.co…
Copilot Mar 3, 2026
91cd4a2
Fix CLI install command to use correct staging syntax: -q staging
Copilot Mar 3, 2026
71b146f
Bifurcate samples into cs/ and ts/ AppHost subfolders
IEvangelist Mar 10, 2026
a560b60
Clean build artifacts and document cs/ts folder structure in README
IEvangelist Mar 10, 2026
388d3fd
Generate .modules/ SDK for all TypeScript AppHosts via aspire add
IEvangelist Mar 10, 2026
72c9f71
Fix database-containers ts/apphost.ts init.sql path
IEvangelist Mar 10, 2026
79d171f
Regenerate TS apphosts using aspire new template
IEvangelist Mar 10, 2026
4fb0d96
Fix TS apphost patterns: await, ContainerLifetime, withServiceReference
IEvangelist Mar 10, 2026
9f5e912
Update sample READMEs with cs/ts directory instructions
IEvangelist Mar 10, 2026
b076e01
Update aspire-shop frontend, fix apphost.ts files, and update package…
IEvangelist Mar 10, 2026
1122ece
Fix container-build and orleans-voting TS apphosts from aspire run te…
IEvangelist Mar 10, 2026
2fc9565
Remove POLYGLOT_NOTES.md
IEvangelist Mar 10, 2026
12cae7c
Fix container-build Go sample: remove unused import, fix parameter
IEvangelist Mar 10, 2026
3871535
Remove root-level .aspire/settings.json
IEvangelist Mar 10, 2026
c5270be
Revert standalone-dashboard: remove cs subfolder
IEvangelist Mar 10, 2026
f66a305
Add WinForms and WPF client projects to TypeScript apphost and update…
IEvangelist Mar 11, 2026
de6ac73
Update samples/container-build/ts/apphost.ts
IEvangelist Mar 13, 2026
0f682be
Refresh TS apphosts for Aspire 13.2
IEvangelist Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ Samples for [Aspire](https://aspire.dev).
| [HealthChecksUI](./samples/health-checks-ui) | C# | ASP.NET Core, Containers, Docker Compose | Demonstrates resources with separate isolated endpoints for health checks. |
| [Azure Functions](./samples/aspire-with-azure-functions) | C# | ASP.NET Core, Blazor, Azure Functions, Azure Blob Storage | Shows how to integrate [Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview) with Aspire. |

## Sample Directory Structure

Each sample contains `cs/` and `ts/` subfolders that isolate the C# and TypeScript [polyglot AppHosts](https://learn.microsoft.com/dotnet/aspire/app-host/polyglot-apphost) respectively. Shared service projects remain at the sample root.

To run a sample with the **C# AppHost**:

```bash
cd samples/<sample-name>/cs
aspire run
```

To run a sample with the **TypeScript AppHost** (requires the [staging Aspire CLI](./samples/POLYGLOT_NOTES.md)):

```bash
cd samples/<sample-name>/ts
aspire run
```

## eShop

[eShop](https://github.com/dotnet/eshop) is a reference application implementing an eCommerce web site on a services-based architecture using Aspire.
Expand Down
2 changes: 1 addition & 1 deletion samples/Metrics/Metrics.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Folder Name="/Solution Items/">
<File Path="README.md" />
</Folder>
<Project Path="MetricsApp.AppHost/MetricsApp.AppHost.csproj" />
<Project Path="cs/MetricsApp.AppHost/MetricsApp.AppHost.csproj" />
<Project Path="MetricsApp.Client/MetricsApp.Client.csproj" />
<Project Path="MetricsApp/MetricsApp.csproj" />
<Project Path="ServiceDefaults/ServiceDefaults.csproj" />
Expand Down
5 changes: 4 additions & 1 deletion samples/Metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ This is a simple .NET app that shows off collecting metrics with OpenTelemetry a

## Running the sample

If using the Aspire CLI, run `aspire run` from this directory.
If using the Aspire CLI, first navigate to the desired AppHost language directory, then run the app:

- **C# AppHost**: `cd cs` then `aspire run`
- **TypeScript AppHost**: `cd ts` then `aspire run`

If using VS Code, open this directory as a workspace and launch the `MetricsApp.AppHost` project using either the Aspire or C# debuggers.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
var builder = DistributedApplication.CreateBuilder(args);

var prometheus = builder.AddContainer("prometheus", "prom/prometheus", "v3.2.1")
.WithBindMount("../prometheus", "/etc/prometheus", isReadOnly: true)
.WithBindMount("../../prometheus", "/etc/prometheus", isReadOnly: true)
.WithArgs("--web.enable-otlp-receiver", "--config.file=/etc/prometheus/prometheus.yml")
.WithHttpEndpoint(targetPort: 9090)
.WithUrlForEndpoint("http", u => u.DisplayText = "Prometheus Dashboard");

var grafana = builder.AddContainer("grafana", "grafana/grafana")
.WithBindMount("../grafana/config", "/etc/grafana", isReadOnly: true)
.WithBindMount("../grafana/dashboards", "/var/lib/grafana/dashboards", isReadOnly: true)
.WithBindMount("../../grafana/config", "/etc/grafana", isReadOnly: true)
.WithBindMount("../../grafana/dashboards", "/var/lib/grafana/dashboards", isReadOnly: true)
.WithEnvironment("PROMETHEUS_ENDPOINT", prometheus.GetEndpoint("http"))
.WithHttpEndpoint(targetPort: 3000)
.WithUrlForEndpoint("http", u => u.DisplayText = "Grafana Dashboard");

builder.AddOpenTelemetryCollector("otelcollector", "../otelcollector/config.yaml")
builder.AddOpenTelemetryCollector("otelcollector", "../../otelcollector/config.yaml")
.WithEnvironment("PROMETHEUS_ENDPOINT", $"{prometheus.GetEndpoint("http")}/api/v1/otlp");

builder.AddProject<Projects.MetricsApp>("app")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\MetricsApp\MetricsApp.csproj" />
<ProjectReference Include="..\..\MetricsApp\MetricsApp.csproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions samples/Metrics/ts/.modules/.codegen-hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
54ABC5F6F3238E45FD69B96BCCB0C6A5BB14B11F3C267B90DC987EFF3E1B7E45
Loading
Loading