Autofac configuration
I am just starting with Autofac and I am trying to configure a simple registration, according to the docs this should work:
var builder = new ContainerBuilder();
builder.RegisterType<CurrentUserInfo>().As<ICurrentUserInfo>();
But I am getting:
Incorrect Number of type parameters
And according to the docs:
_containerProvider = new ContainerPr开发者_C百科ovider(builder.Build());
But there is no Build Method...
Restarted Visual Studio..corrupted cache or something
Make sure you have referenced both Autofac.dll
and Autofac.Configuration.dll
.
精彩评论