ProjectResourceBuilderExtensions.AddProject Method

Definition

Overloads

AddProject(IDistributedApplicationBuilder, String, String)

Adds a .NET project to the application model.

AddProject(IDistributedApplicationBuilder, String, String, String)

Adds a .NET project to the application model.

AddProject<TProject>(IDistributedApplicationBuilder, String)

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<TProject>(IDistributedApplicationBuilder, String, String)

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)

Source:
ProjectResourceBuilderExtensions.cs

Adds a .NET project to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ProjectResource> AddProject (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, string projectPath);
static member AddProject : Aspire.Hosting.IDistributedApplicationBuilder * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ProjectResource>
<Extension()>
Public Function AddProject (builder As IDistributedApplicationBuilder, name As String, projectPath As String) As IResourceBuilder(Of ProjectResource)

Parameters

name
String

The name of the resource. This name will be used for service discovery when referenced in a dependency.

projectPath
String

The path to the project file.

Returns

A reference to the IResourceBuilder<T>.

Applies to

AddProject(IDistributedApplicationBuilder, String, String, String)

Source:
ProjectResourceBuilderExtensions.cs

Adds a .NET project to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ProjectResource> AddProject (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, string projectPath, string? launchProfileName);
static member AddProject : Aspire.Hosting.IDistributedApplicationBuilder * string * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ProjectResource>
<Extension()>
Public Function AddProject (builder As IDistributedApplicationBuilder, name As String, projectPath As String, launchProfileName As String) As IResourceBuilder(Of ProjectResource)

Parameters

name
String

The name of the resource. This name will be used for service discovery when referenced in a dependency.

projectPath
String

The path to the project file.

launchProfileName
String

The launch profile to use. If null then no launch profile will be used.

Returns

A reference to the IResourceBuilder<T>.

Applies to

AddProject<TProject>(IDistributedApplicationBuilder, String)

Source:
ProjectResourceBuilderExtensions.cs

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.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ProjectResource> AddProject<TProject> (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name) where TProject : Aspire.Hosting.IProjectMetadata, new();
static member AddProject : Aspire.Hosting.IDistributedApplicationBuilder * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ProjectResource> (requires 'Project :> Aspire.Hosting.IProjectMetadata and 'Project : (new : unit -> 'Project))
<Extension()>
Public Function AddProject(Of TProject As {IProjectMetadataNew}) (builder As IDistributedApplicationBuilder, name As String) As IResourceBuilder(Of ProjectResource)

Type Parameters

TProject

A type that represents the project reference.

Parameters

name
String

The name of the resource. This name will be used for service discovery when referenced in a dependency.

Returns

A reference to the IResourceBuilder<T>.

Applies to

AddProject<TProject>(IDistributedApplicationBuilder, String, String)

Source:
ProjectResourceBuilderExtensions.cs

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.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ProjectResource> AddProject<TProject> (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, string? launchProfileName) where TProject : Aspire.Hosting.IProjectMetadata, new();
static member AddProject : Aspire.Hosting.IDistributedApplicationBuilder * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ProjectResource> (requires 'Project :> Aspire.Hosting.IProjectMetadata and 'Project : (new : unit -> 'Project))
<Extension()>
Public Function AddProject(Of TProject As {IProjectMetadataNew}) (builder As IDistributedApplicationBuilder, name As String, launchProfileName As String) As IResourceBuilder(Of ProjectResource)

Type Parameters

TProject

A type that represents the project reference.

Parameters

name
String

The name of the resource. This name will be used for service discovery when referenced in a dependency.

launchProfileName
String

The launch profile to use. If null then no launch profile will be used.

Returns

A reference to the IResourceBuilder<T>.

Applies to