ProjectResourceBuilderExtensions
Class static net10.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)extensionexperimentalIResourceBuilder<ProjectResource> Adds a C# project or file-based app to the application model.
AddCSharpApp(IDistributedApplicationBuilder, string, string, Action<ProjectResourceOptions>)extensionexperimentalIResourceBuilder<CSharpAppResource> Adds a C# project or file-based app to the application model.
AddProject(IDistributedApplicationBuilder, string)extensionIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
AddProject(IDistributedApplicationBuilder, string, string)extensionIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
AddProject(IDistributedApplicationBuilder, string, string?)extensionIResourceBuilder<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?)extensionIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
AddProject(IDistributedApplicationBuilder, string, Action<ProjectResourceOptions>)extensionIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
AddProject(IDistributedApplicationBuilder, string, string, Action<ProjectResourceOptions>)extensionIResourceBuilder<ProjectResource> Adds a .NET project to the application model.
DisableForwardedHeaders(IResourceBuilder<ProjectResource>)extensionIResourceBuilder<ProjectResource> Configures the project to disable forwarded headers when being published.
PublishAsDockerFile(IResourceBuilder<T>, Action<IResourceBuilder<ContainerResource>>)extension 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>)extensionIResourceBuilder<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)extensionIResourceBuilder<ProjectResource> Configures how many replicas of the project should be created for the project.