Skip to content

Don't call GetService in Package constructors #46

@AlexEyler

Description

@AlexEyler

Calling GetService in Package constructors is a common place for failures - there's no guarantee that the service provider will be properly set up by the time the Package is created.

Instead, the GetService call should be done in Initialize (or InitializeAsync, after switching to the main thread).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions