IDistributedApplicationBuilder.Build Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Builds and returns a new DistributedApplication instance. This can only be called once.
public Aspire.Hosting.DistributedApplication Build ();
abstract member Build : unit -> Aspire.Hosting.DistributedApplication
Public Function Build () As DistributedApplication
Returns
A new DistributedApplication instance.
Remarks
Callers of the Build() method should only call it once. are responsible for the lifecycle of the DistributedApplication instance that is returned. Note that the DistributedApplication type implements IDisposable and should be disposed of when it is no longer needed. Note that in many templates and samples Dispose is omitted for brevity because in those cases the instance is destroyed when the process exists.