-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add support for IHostingStartup/IHostStartup in generic host #36394
Comments
@davidfowl @Tratcher thoughts for 3.0? |
I think we can do this for 3.0 yes |
IMHO it would be great to also have support for the
similar to the WebHost so a developer can inject assemblies that register/configure services prior to creation of the Host and/or IHostedService, BackgroundService without explicitly referencing/changing code. |
Is this still in scope for 3.0? |
No, it's in the backlog. |
@Tratcher do you know if the plan is to get this into 3.1 ? or sooner after v3.0 release ? |
We haven't made plans for 3.1 yet, and it's not clear how high a priority this scenario is, we've only heard interest from a few people. |
Use case: Azure Pipelines (and other CIs) have their own syntax for parsing warnings and errors. If we had Point is under normal running the tool would log using normal console logger. In Azure Pipelines the output would actually highlight warnings and errors in the Azure Pipelines Build summary. I actually do something quite similar for my .NET Core building tasks. I pass a custom MSBuild logger assembly as an argument to all .NET Core tasks. But the principle is very similar. |
Regarding the Needs Design label, can't we simply copy the functionality from
|
@couven92 this seems on the face of it what is needed, and this would definitely assist in helping building a flexible/plugin host and dynamic configuration of services prior to the bootstrapping of services; I'm wondering if this type of process (dynamic loading of assembly) should verify that the assembly is signed using the a digital key and if the host trusts the signed key? which in itself opens up a few questions around the current implementation in the Microsoft.AspNetCore.Hosting namespace/assembly. |
Any updates on this item? |
cc: @davidfowl @Tratcher I made an implementation that mirrors that in After further inspection I don't think it is a straightforward as just adding those methods. IMO the better implementation would be to support it in Also, moving I'm happy to make changes and send a PR once design consensus is achieved. |
@davidfowl @Tratcher any updates on this? it's something that I'd like to use; but not sure if it's work implementing myself or if a extension from the team is coming/available or on backlog? |
I'm closing this issue as this isn't an approach we are going to take. Instead, in |
In WebHost, there is IHostingStartup interface, see aspnet/Hosting#1000.
Can we do something similar for generic host, something like below
I will need this to execute some platform specific logic for integration testing with Service Fabric; I could define my own interface and get it work, but it would be useful if such concept could be generic in the generic host.
The text was updated successfully, but these errors were encountered: