mvvm light - Mvvmlight and Xamarin.iOS unable to find default ctor -
i have project running fine on android , winphone 8. when attempt run on ios, i've getting following error
microsoft.practices.servicelocation.activationexception: cannot register: no public constructor found in x
where x
whatever simpleioc.default.register<t, tu>();
flow hits first. i've moved code around (as suggested elsewhere) ensure of platform specific simpleioc
calls made in viewmodellocator
.
i've added public default ctors in classes complaining error (i have though set preferredconstructor
original, not newly added public ctor).
i have feeling error false positive (something else failing, pointing @ code).
using xam.ios via build server (the code coming vs2015). xcode running 8.3 emulators (it may need updating allow 8.4 testing)
it linker optimising away constructor, if thinks it's not used. try setting linker options "don't link" , see if again, or new-up instance of class elsewhere linker knows constructor used. don't want leave way, if eliminates error, you'll @ least know reason.
Comments
Post a Comment