Closed ushenkodmitry closed 3 years ago
Hello there,
with the latest ReactiveUI.Uno i'm getting exception
System.Exception: Failed to load App1.MainPage: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Don't know how to detect when ReactiveLinker.MainPage is activated/deactivated, you may need to implement IActivationForViewFetcher
when i'm adding
this.WhenActivated(d => { });
in the main page ctor. Only in WASM.
Hello, any suggestion where to look?
Hello again, Great job! It seems it is now working with the latest ReactiveUI.Uno and Uno.
<PackageReference Include="ReactiveUI.Fody" Version="13.0.27" />
<PackageReference Include="ReactiveUI.Uno" Version="13.0.27" />
<PackageReference Include="Splat.Autofac" Version="9.8.1" />
<PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection" Version="9.8.1" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Controls" Version="6.1.0-build.205.g2e0e348372" />
<PackageReference Include="Uno.UI.WebAssembly" Version="3.4.0-dev.356" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="2.0.0-dev.125" />
<PackageReference Include="Uno.Wasm.Bootstrap.DevServer" Version="2.0.0-dev.125" />
Nope, not working.
How you using autofac? It's the likely issue
Well the fact you've got two competing di installations
Finally, i figured it out. ActivationForViewFetcher implementation was not registered in the container. Adding ActivationForViewFetcher implementation from ReactiveUI.Uno package did the trick. It seems that InitializeReactiveUI() doesn't register the implementation when running on WASM. That's another story. So i'm closing this. And yes, you were right. I had both MSDI and Autofac in my dependencies. Now i'm on MSDI, as Autofac, as you said, has some issues.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Describe the bug Default splashscreen with exception in browser's console
Steps To Reproduce
Expected behavior
Application's first view shown.
Screenshots
Environment
Additional context It seems adding RoutedViewHost breaks everything. Application was running fine until RoutedViewHost was added with XAML below: