WebUSB
WebUSB copied to clipboard
Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Blazor.Extensions.WebUSB.IUSB'.
When trying to start the application after installing WebUSB, the app crashes with the following message: An error occurred while starting the application. AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Blazor.Extensions.WebUSB.IUSB Lifetime: Singleton ImplementationType: Blazor.Extensions.WebUSB.USB': Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Blazor.Extensions.WebUSB.IUSB'.) Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable<ServiceDescriptor> serviceDescriptors, ServiceProviderOptions options)
InvalidOperationException: Error while validating the service descriptor 'ServiceType: Blazor.Extensions.WebUSB.IUSB Lifetime: Singleton ImplementationType: Blazor.Extensions.WebUSB.USB': Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Blazor.Extensions.WebUSB.IUSB'.