Xamarin to Maui - Error in CheckRules #4620
-
Hi, I'm getting an exception in CheckRules when run on the Maui client (Android). The exception message is Multiple constructors accepting all given argument types have been found in type 'Csla.LazySingleton I can replicate it during app startup with the following code: The only place LazySingleton is used is in the RuleContext's ctor
I think it can't tell the difference between the default ctor and the one that takes a Func delegate, although based on the code I don't think that ctor is ever actually used anywhere. Any ideas on how to fix this? I can replicate it with Csla 7.0.7 and 8.2.9. The only unusual thing may be that we are backing ServiceProvider with the Unity container, but as near as I can tell the error is from ServiceProvider code only. I've also tried updating the Extensions.DI from 6 to 7 and the issue remains there as well. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@ajohnstone-ks this only happens on Android? Do you have a unit test or simple console app that shows the behavior? |
Beta Was this translation helpful? Give feedback.
@rockfordlhotka Sorry I had forgotten about this; I wasn't sure if it was happening on IOS because the IOS version of our app was crashing on startup.
I think ultimately the issue was how we were setting up the ServiceProvider, because we were still trying to use Unity & the Unity for SP libraries, which made the configuration of everything during startup a bit convoluted.
We did get it squared away though and then moved off of Unity completely so we're no longer hitting this issue.