Skip to content

Enable Scope Validation for dependency injection in .NET MAUI during development #11457

@danroth27

Description

@danroth27

One source of common user errors is misconfiguring services in DI. For example, setting up a singleton service that depends on a scoped service 😱. The DI system has a feature, scope validation, for detecting these issues, but we don't turn it on for .NET MAUI apps. We do enable scope validation in ASP.NET Core apps during development, but it doesn't look like we do that for .NET MAUI apps. It seems like we should.

@davidfowl

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions