DistributedApplication.Run 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.
Runs an application and blocks the calling thread until host shutdown is triggered and all IHostedService instances are stopped.
public void Run ();
member this.Run : unit -> unit
Public Sub Run ()
Remarks
When the .NET Aspire app host is launched via RunAsync(CancellationToken) there are two possible modes that it is running in:
Developers extending the .NET Aspire application model should consider the lifetime of IHostedService instances which are added to the dependency injection container. For more information on determining the mode that the app host is running in refer to DistributedApplicationExecutionContext.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for