-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use NSwag.Build, because of cleaning of hosted services. #4722
Comments
See #4523 |
Which IHostedService is being resolved and gives the exception? |
@desjoerd https://github.com/umbraco/Umbraco-CMS/blob/36402a149ad205f0bc9c55166c014bf68c8a8b8b/src/Umbraco.Core/Services/IRuntime.cs#L8 |
Hmm, I think the removal of IHostedService registrations is too greedy.
That probably should be just an equals. I will check this on Monday whether this would solve the Umbraco issue and prevent background services from running. |
I verified with a few tests that the removal of IHostedService registrations should only look at the specific interface and not too base interfaces. Within Umbraco the IRuntime implements IHostedService and there is a registration just registering it as |
Hi!
I was looking into generating Typecript services and models with usage of nswag, but noticed that it will not work because of :
https://github.com/RicoSuter/NSwag/blob/116c636fb7491623eb6c70725b8fb20c450ec96c/src/NSwag.Commands/HostApplication.cs#L112C23-L119C26
I am trying understand why it was introduced when using GetServiceProviderWithHostFactoryResolver.
As right now I can't generate models when using umbraco cms, as it will throw me missing services which are host services!
The text was updated successfully, but these errors were encountered: