ProjectResourceBuilderExtensions
Class static net8.0
Provides extension methods for
IDistributedApplicationBuilder to add and configure project resources. namespace Aspire.Hosting;
public static class ProjectResourceBuilderExtensions{ // ...} 12 members
Methods12
Section titled MethodsAddCSharpApp(IDistributedApplicationBuilder, string, string)extensionexperimentalats exportIResourceBuilder<ProjectResource> Adds a C# project or file-based app to the application model.
AddCSharpApp(IDistributedApplicationBuilder, string, string, Action<ProjectResourceOptions>)extensionexperimentalats exportIResourceBuilder<CSharpAppResource> Adds a C# project or file-based app to the application model.
AddProject(IDistributedApplicationBuilder, string)extensionats ignoredIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
AddProject(IDistributedApplicationBuilder, string, string)extensionats ignoredIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
AddProject(IDistributedApplicationBuilder, string, string?)extensionats ignoredIResourceBuilder<ProjectResource> Adds a .NET project to the application model. By default, this will exist in a Projects namespace. e.g. Projects.MyProject. If the project is not in a Projects namespace, make sure a project reference is added from the AppHost project to the target project.
AddProject(IDistributedApplicationBuilder, string, string, string?)extensionats exportIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
AddProject(IDistributedApplicationBuilder, string, Action<ProjectResourceOptions>)extensionats ignoredIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
AddProject(IDistributedApplicationBuilder, string, string, Action<ProjectResourceOptions>)extensionats exportIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
DisableForwardedHeaders(IResourceBuilder<ProjectResource>)extensionats exportIResourceBuilder<ProjectResource> Configures the project to disable forwarded headers when being published.
PublishAsDockerFile(IResourceBuilder<T>, Action<IResourceBuilder<ContainerResource>>)extensionats export Adds support for containerizing this
ProjectResource during deployment. The resulting container image is built, and when the optional configure action is provided, it is used to configure the container resource. WithEndpointsInEnvironment(IResourceBuilder<ProjectResource>, Func<EndpointAnnotation, bool>)extensionats ignoredIResourceBuilder<ProjectResource> Set a filter that determines if environment variables are injected for a given endpoint. By default, all endpoints are included (if this method is not called).
WithReplicas(IResourceBuilder<ProjectResource>, int)extensionats exportIResourceBuilder<ProjectResource> Configures how many replicas of the project should be created for the project.