Corfedo.Troupe.Aspire.Hosting
0.4.0
Prefix Reserved
dotnet add package Corfedo.Troupe.Aspire.Hosting --version 0.4.0
NuGet\Install-Package Corfedo.Troupe.Aspire.Hosting -Version 0.4.0
<PackageReference Include="Corfedo.Troupe.Aspire.Hosting" Version="0.4.0" />
<PackageVersion Include="Corfedo.Troupe.Aspire.Hosting" Version="0.4.0" />
<PackageReference Include="Corfedo.Troupe.Aspire.Hosting" />
paket add Corfedo.Troupe.Aspire.Hosting --version 0.4.0
#r "nuget: Corfedo.Troupe.Aspire.Hosting, 0.4.0"
#:package Corfedo.Troupe.Aspire.Hosting@0.4.0
#addin nuget:?package=Corfedo.Troupe.Aspire.Hosting&version=0.4.0
#tool nuget:?package=Corfedo.Troupe.Aspire.Hosting&version=0.4.0
Corfedo.Troupe.Aspire.Hosting
Runs Corfedo Troupe profiles and roles as Aspire project resources. Reference
it from the AppHost project only; the application keeps referencing Corfedo.Troupe.
dotnet add package Corfedo.Troupe.Aspire.Hosting
var gateway = builder.AddTroupeProject<Projects.Operations>("gateway").WithTroupeProfile("gateway");
var api = builder.AddTroupeProject<Projects.Operations>("api")
.WithTroupeProfile("api")
.WithEnvironment("Roles__Remote__gateway", gateway.GetEndpoint("internal"));
// An application that selects through its own command line:
builder.AddTroupeProject<Projects.Host>("host-api").WithArgs("serve", "--profile", "api");
AddTroupeProject adds the project without its launch profile and Kestrel-derived endpoints, because Kestrel serves
only the listeners the composition requests. WithTroupeProfile and WithTroupeRoles set the Profile or Roles
environment variable. Before any resource starts, each project describes the composition it would serve with the
resource's arguments and environment (Troupe's describe mode, about half a second per project). Then the package:
- adds an HTTP endpoint for each listener the project requests, unless the AppHost declares an endpoint with that name,
and sets
Kestrel__Endpoints__<name>__Urlto the endpoint's target port; - fails the AppHost once, before any resource starts, with the errors
AddTroupereports for every resource; - shows each resource's profile, roles and listeners on the dashboard, and the roles of the project that no resource runs.
Troupe resources cannot start:
api: needs Roles__Remote__ai (read by ApiCalls because AiHost is not in this process).
AiHost runs in "ai" (listeners: internal).
ops-bad: TRP013: Unknown profile gatewy. Declared profiles: combined, api, gateway, ai, api-gateway.
The project must be built and must call AddTroupe from a Corfedo.Troupe version with describe mode. See the
Aspire guide.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Aspire.Hosting (>= 13.6.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.