In #6425 I had to hack around the fact that we don't provide a mechanism in extension packages to start and stop a resource during the lifetime of the AppHost. This came up because in #6425 I needed to spin up two app hosts sequentially to test the container lifetime behavior.
To work around the issue I added an ApplicationExecutorProxy to Aspire.Hosting.Tests which allowed me to call these methods but this is really just a temporary measure so we don't block tests for this feature in shipping .NET 9.0.
Once we ship 9.0, we should look at doing work in 9.x to allow greater control of the lifecycle of individual resources. I think that there are probably two separate angles of attack here (and we may want to do both of them).
In #6425 I had to hack around the fact that we don't provide a mechanism in extension packages to start and stop a resource during the lifetime of the AppHost. This came up because in #6425 I needed to spin up two app hosts sequentially to test the container lifetime behavior.
To work around the issue I added an
ApplicationExecutorProxytoAspire.Hosting.Testswhich allowed me to call these methods but this is really just a temporary measure so we don't block tests for this feature in shipping .NET 9.0.Once we ship 9.0, we should look at doing work in 9.x to allow greater control of the lifecycle of individual resources. I think that there are probably two separate angles of attack here (and we may want to do both of them).