Watch Aspire live streamsDocsTry Aspire

DotnetProjectResource

Handle
📦 Aspire.Hosting.Dotnet v13.6.0-preview.1.26478.8
interface DotnetProjectResource
extends IComputeResource,
IContainerFilesDestinationResource,
IDotnetProgramResource,
IResource,
IResourceWithArgs,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IResourceWithServiceDiscovery {
disableForwardedHeaders(): DotnetProjectResource;
withBuildEnvironment(
name: string,
value: string): DotnetProjectResource;
withEndpointsInEnvironment(endpointNames: string[]): DotnetProjectResource;
withReplicas(replicas: number): DotnetProjectResource;
}

Methods

Disables forwarded headers for a .NET project in polyglot AppHosts.
disableForwardedHeaders(): DotnetProjectResource
DotnetProjectResource
Adds an environment variable to the build process for a .NET project.
withBuildEnvironment(
name: string,
value: string): DotnetProjectResource
namestring
valuestring
DotnetProjectResource
Configures endpoint environment-variable injection for a .NET project in polyglot AppHosts.
withEndpointsInEnvironment(endpointNames: string[]): DotnetProjectResource
endpointNamesstring[]
DotnetProjectResource
methodwithReplicasbuilder
Configures the number of .NET project replicas for polyglot AppHosts.
withReplicas(replicas: number): DotnetProjectResource
replicasnumber
DotnetProjectResource