I want to run a worker (as Thread or BackgroundWorker) multiple times inside a .NET Aspire AppHost project, which is started from a Blazor Website.
I have the Projects (AppHost [Aspire], Web [Blazor], Worker [dll]).
Since I'm new to Aspire I don't know if this is even possible or how to do it.
I tried using the aspire builder.Services.AddHostedServices(); which did not work due to the namespace not being found because of the using Projects; which is needed for the blazor project as far as I understand.
I also tried registering it as a project which kinda worked.. well at least it started event if only once and only at the boot without any control over it via the web project.