This project has moved and is read-only. For the latest updates, please go here.


Register throws exception when class without ctor and static field is registered


See this question ( on Stackoverflow.

The problem is the method GetConstructorInfo in the SimpleIoc class which throws an exception "Multiple constructors found but none marked with PreferredConstructor", cause the class has a default ctor and a static ctor.
Closed Nov 26, 2017 at 9:40 PM by lbugnion
Cannot repro


Necroman wrote May 19, 2013 at 10:51 AM

Same here, I got these two constructors in MainViewModel, but I am getting exception that none has PreferredConstructor attribute:
    public MainViewModel()

    public MainViewModel(INavigationService navigationService)
        _navigationService = navigationService;