Registration difficulties

Oct 4, 2011 at 1:39 PM

I have downloaded and ionstalled the latest version, but can;t seem to get it to work.

I have an MVC application that does standard registration as  


Later ..    


This works fine but fails when I try to use AutoRegistration instead, as follows

        .Include(If.ImplementsITypeName, Then.Register().WithTypeName())

 However, when I step through the code I can see the registration logic execute  IModel and it's related Model

_registrationEntries.Add(new RegistrationEntry(
(t, c) => {
registrationOptions.Type = t;
foreach (var contract in registrationOptions.Interfaces) {
c.RegisterType( contract, t, registrationOptions.Name, registrationOptions.LifetimeManager);
}, _container

I must be doing something wrong.  

Oct 5, 2011 at 11:39 AM

You're registering your types with name (and IIRC to resolve them you have to supply the name), what you probably want is just:

.Include(If.ImplementsITypeName, Then.Register())

In this case 


should work for you.