Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Do not call 'IServiceCollection.BuildServiceProvider' in 'ConfigureServices' #187

Copy link
Copy link
@andersjarl

Description

@andersjarl
Issue body actions

Hi!

When doing call in ConfigureServices:

services.AddExtCore(this.extensionsPath, false, new ExtCore.WebApplication.DefaultAssemblyProvider(services.BuildServiceProvider())

You will get the following warning:
warning ASP0000: Calling 'BuildServiceProvider' from application code results in an additional copy of singleton services being created. Consider alternatives such as dependency injecting services as parameters to 'Configure'.

Is this something you are going to address?
It is not recommended to use BuildServiceProvider inside ConfigureServices but the constructor of DefaultAssemblyProvider expects to get a ServiceProvider.

Regards
Anders

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.