DotnetProjectHostingExtensions
Classstaticnet10.0
Provides extension methods for adding SDK-style .NET projects and file-based C# apps (by path) to an
Hosting.IDistributedApplicationBuilder . namespace Aspire.Hosting;
public static class DotnetProjectHostingExtensions{ // ...}9 members
Methods9
Section titled MethodsIResourceBuilder<DotnetProjectResource> Adds an SDK-style .NET project or file-based C# app to the application model.
AddDotnetProject(IDistributedApplicationBuilder, string, string, Action<ProjectResourceOptions>) extensionats ignoredIResourceBuilder<DotnetProjectResource> Adds an SDK-style .NET project or file-based C# app to the application model.
IResourceBuilder<DotnetProjectResource> Disables automatic forwarded-header configuration when publishing the .NET project.
IProjectMetadata Gets the project metadata for the .NET project resource.
IResourceBuilder<DotnetProjectResource> Adds an environment variable to the build process for a .NET project.
WithBuildEnvironment(IResourceBuilder<DotnetProjectResource>, Action<EnvironmentCallbackContext>) extensionats ignoredIResourceBuilder<DotnetProjectResource> Adds a callback that configures build-only environment variables for a .NET project.
WithBuildEnvironment(IResourceBuilder<DotnetProjectResource>, Func<EnvironmentCallbackContext, Task>) extensionats ignoredIResourceBuilder<DotnetProjectResource> Adds an asynchronous callback that configures build-only environment variables for a .NET project.
WithEndpointsInEnvironment(IResourceBuilder<DotnetProjectResource>, Func<EndpointAnnotation, bool>) extensionats ignoredIResourceBuilder<DotnetProjectResource> Configures which endpoints contribute environment variables for the .NET project.
IResourceBuilder<DotnetProjectResource> Configures the number of replicas of the .NET project.