azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Add IServiceProvider to dependency validator

Open madelinegordon opened this issue 2 years ago • 0 comments

What problem would the feature you're requesting solve? Please describe.

Customers are registering IServiceProvider, and this is leading to unexpected behavior and startup issues.

Describe the solution you'd like

Add validation logic such that customers running on:

  • v3: receive a clear warning that this registration might cause startup issues.
  • v4: receive a clear error stating that they cannot register IServiceProvider.

Documentation stating that functions doesn't support registration of host services already exists, and adding this layer of validation would ensure more clear errors indicating the problem.

Additional context

DependencyValidator.cs

madelinegordon avatar Jul 15 '22 22:07 madelinegordon