When Resource is Project and is terminated due to an exception the state is Finished with exit code 0 #7373
Labels
area-app-model
Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Milestone
Is there an existing issue for this?
Describe the bug
When using a Project Resource and for any reason it is terminated because of an exception while in debug, in other words, exit code not 0, the dashboard does not keep track of this and marks it as Finished without errors. A consequence is that if another resource is set to
WaitForCompletion
it'll start as if the referenced project was gracefully finished.App1 is finished with an exception:
![Image](https://private-user-images.githubusercontent.com/6741634/408879810-d3a4c03a-4149-490c-b3e0-0a19a159cf41.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTgwNTAsIm5iZiI6MTczOTM1Nzc1MCwicGF0aCI6Ii82NzQxNjM0LzQwODg3OTgxMC1kM2E0YzAzYS00MTQ5LTQ5MGMtYjNlMC0wYTE5YTE1OWNmNDEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTA1NTUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjY2YTVmMjgxYTI0ODEzYmIyYjRjYzlhOWQ1ZGE0MjRhZDFhMGFlOGU3ZjQxMzFkMmY2NGE4ZmY5N2FhMzU2NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.XxOq1WLKWOivr28StjvSJICTmZTWr55piIh1D5yYIoo)
App2 is started even if the completion exited with error:
![Image](https://private-user-images.githubusercontent.com/6741634/408879849-5ae963ad-54f7-4ac9-bdf5-e091e31ad7e8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTgwNTAsIm5iZiI6MTczOTM1Nzc1MCwicGF0aCI6Ii82NzQxNjM0LzQwODg3OTg0OS01YWU5NjNhZC01NGY3LTRhYzktYmRmNS1lMDkxZTMxYWQ3ZTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTA1NTUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTBmZWEzOThkZDZkYmYwNGRiOWMxOTFkODkyMzY2OWZmMDk0ZjkyNjFlMGE2MjI3Y2E3NWM1ZWU0MWFlYjk1ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.9AJbmsBIPRIJqe5B3qmi_RPnwSM2bMWj2XzivbzXxZ8)
The AppHost is very simple:
Expected Behavior
The DCP should keep track of the debug exit code instead of marking the resource as Finished without errors.
Steps To Reproduce
Repro project: https://github.com/arielmoraes/AspireFinishedStateError
I've just created the full Aspire template with two simple console app.
Exceptions (if any)
No response
.NET Version info
.NET SDK:
Version: 9.0.102
Commit: cb83cd4923
Workload version: 9.0.100-manifests.4a54b1a6
MSBuild version: 17.12.18+ed8c6aec5
Ambiente de runtime:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.102\
Cargas de trabalho do .NET instaladas:
[aspire]
Origem da Instalação: VS 17.12.35707.178
Versão do Manifesto: 8.2.2/8.0.100
Caminho do Manifesto: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Tipo de Instalação: Msi
Anything else?
Using Visual Studio with Aspire 9.0.0 and ASP.NET Core 9
The text was updated successfully, but these errors were encountered: