Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

Cannot consume scoped service #11

Open
@dmarciano

Description

@dmarciano

I installed the NuGet package and followed the code samples provided, but when I attempted to run the site I get the following error message:

InvalidOperationException: Error while validating the service descriptor 'ServiceType: Blazor.IndexedDB.Framework.IIndexedDbFactory Lifetime: Singleton ImplementationType: Blazor.IndexedDB.Framework.IndexedDbFactory': Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Blazor.IndexedDB.Framework.IIndexedDbFactory'.

In the Startup.cs file, if I add the library as a transient (i.e. services.AddTransient<IIndexedDbFactory, IndexedDbFactory>();) then my site will load but when I try to call the create method I get an error about TimeGhost not being found in the window. I tried searching online for anything about TimeGhost but had no luck.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions