canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using MicrosoftDependencyInjectionBootstrapper runtime errors

litiansky opened this issue · comments

Description
System.InvalidOperationException
HResult=0x80131509
Message=No service for type 'InvoicingSys.Client.Wpf.Pages.ShellViewModel' has been registered.
Source=Microsoft.Extensions.DependencyInjection.Abstractions
StackTrace:
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at InvoicingSys.Client.Wpf.MicrosoftDependencyInjectionBootstrapper1.GetInstance(Type type) in C:\Development_Avecto\Sky\Work\InvoicingSys\src\InvoicingSys.Client.Wpf\MicrosoftDependencyInjectionBootstrapper.cs:line 64 at InvoicingSys.Client.Wpf.MicrosoftDependencyInjectionBootstrapper1.get_RootViewModel() in C:\Development_Avecto\Sky\Work\InvoicingSys\src\InvoicingSys.Client.Wpf\MicrosoftDependencyInjectionBootstrapper.cs:line 17
at InvoicingSys.Client.Wpf.MicrosoftDependencyInjectionBootstrapper`1.Launch() in C:\Development_Avecto\Sky\Work\InvoicingSys\src\InvoicingSys.Client.Wpf\MicrosoftDependencyInjectionBootstrapper.cs:line 69
at Stylet.BootstrapperBase.Start(String[] args)
at Stylet.BootstrapperBase.b__9_0(Object o, StartupEventArgs e)
at System.Windows.Application.OnStartup(StartupEventArgs e)
at InvoicingSys.Client.Wpf.App.<>n__0(StartupEventArgs e)
at InvoicingSys.Client.Wpf.App.d__3.MoveNext() in C:\Development_Avecto\Sky\Work\InvoicingSys\src\InvoicingSys.Client.Wpf\App.xaml.cs:line 53

Version Info

  • Stylet version: 1.3.6
  • Runtime version: Net 5

Additional Info
I want to use the ABP VNext framework. If the MVVM framework is not applicable, ABP can inject services and access them, but with stylet, ABP services cannot be injected properly. Please help me, I have been working on it for more than two weeks.