Autofac quit allows constructors in iOS after Xamarin update
So, I have updated my Xamarin version today to the latest stable release. As of update, my app won't work on iOS (works fine on Android) ... the error is that it can't resolve the constructor.
Autofac.Core.DependencyResolutionException: Constructors of type 'FutureState.AppCore.Migrations.Migration001' cannot be found by finder constructor 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder'.
My original constructor
public Migration001(IUserRepository userRepository,
IRoleRepository roleRepository,
IPermissionRepository permissionRepository,
IPasswordHasher passwordHasher)
{
_userRepository = userRepository;
_roleRepository = roleRepository;
_permissionRepository = permissionRepository;
_passwordHasher = passwordHasher;
MigrationVersion = 1;
}
but I even tried changing it to a service location to see if Autofac finds the constructor.
public Migration001()
{
_userRepository = App.Container.Resolve<IUserRepository>();
_roleRepository = App.Container.Resolve<IRoleRepository>();
_permissionRepository = App.Container.Resolve<IPermissionRepository>();
_passwordHasher = App.Container.Resolve<IPasswordHasher>();
MigrationVersion = 1;
}
but unfortunately this leads to the same problem.
Autofac.Core.DependencyResolutionException: Constructors of type 'FutureState.AppCore.Migrations.Migration001' cannot be found by finder constructor 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder'.
what could cause something like this? This is a Xamarin.Forms app, so the same code runs without issue on Android.
source to share