Prerequisites
Describe the bug 🐞
With ReactiveUI and Avalonia, I'm following the documentation to use my own DI container with a custom IDependencyResolver implementation and the AppBuilder extension .UseReactiveUIWithDIContainer().
I'm receiving an InvalidOperationException when trying to resolve ReactiveUI.Validation.Formatters.Abstractions.IValidationTextFormatter`1[System.String]. The Validation classes are not registered into my container through my resolver. They are registered in the original Splat container before AppLocator.SetLocator(dependencyResolver) switches. What's the correct way to resolve this?
Steps to reproduce
using LightInject;
internal class Program
{
private static ServiceContainer _container;
[STAThread]
public static void Main(string[] args)
{
_container = RegisterContainer();
var builder = BuildAvaloniaApp();
builder.StartWithClassicDesktopLifetime(args);
}
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure(static () => new App(_container))
.UsePlatformDetect()
.WithInterFont()
.LogToTrace()
.UseReactiveUIWithDIContainer(() => _container,
x => { },
c => new LightInjectResolver(c),
x =>
{
x.WithExceptionHandler(new RootExceptionHandler());
});
}
Reproduction repository
No response
Expected behavior
I would have expected an instance of ReactiveUI.Validation.Formatters.Abstractions.IValidationTextFormatter`1[System.String] to be automatically registered through my IDependencyResolver implementation. Or alternatively, a method to register RxUI.Validation types manually
Screenshots 🖼️
No response
IDE
No response
.NET version
.NET 10
Target framework(s)
No response
Operating system
No response
OS version
No response
Device
No response
ReactiveUI version
ReactiveUI.Validation=7.1.0, ReactiveUI.Avalonia=12.0.3
Additional information ℹ️
No response
Prerequisites
Describe the bug 🐞
With ReactiveUI and Avalonia, I'm following the documentation to use my own DI container with a custom IDependencyResolver implementation and the AppBuilder extension .UseReactiveUIWithDIContainer().
I'm receiving an InvalidOperationException when trying to resolve ReactiveUI.Validation.Formatters.Abstractions.IValidationTextFormatter`1[System.String]. The Validation classes are not registered into my container through my resolver. They are registered in the original Splat container before AppLocator.SetLocator(dependencyResolver) switches. What's the correct way to resolve this?
Steps to reproduce
Reproduction repository
No response
Expected behavior
I would have expected an instance of ReactiveUI.Validation.Formatters.Abstractions.IValidationTextFormatter`1[System.String] to be automatically registered through my IDependencyResolver implementation. Or alternatively, a method to register RxUI.Validation types manually
Screenshots 🖼️
No response
IDE
No response
.NET version
.NET 10
Target framework(s)
No response
Operating system
No response
OS version
No response
Device
No response
ReactiveUI version
ReactiveUI.Validation=7.1.0, ReactiveUI.Avalonia=12.0.3
Additional information ℹ️
No response