Autofac / MVC4 / WebApi (RC) Dependency Injection issue after upgrading from beta

Posted by George D. on Stack Overflow See other posts from Stack Overflow or by George D.
Published on 2012-06-02T23:17:30Z Indexed on 2012/07/08 9:16 UTC
Read the original article Hit count: 317

Filed under:
|
var resolver = new AutofacWebApiDependencyResolver(container);
configuration.ServiceResolver.SetResolver(resolver);

after updating to ASP.NET MVC4 (RC) I get the following error:

'System.Web.Http.HttpConfiguration' does not contain a definition for 'ServiceResolver' and no extension method 'ServiceResolver' accepting a first argument of type 'System.Web.Http.HttpConfiguration' could be found (are you missing a using directive or an assembly reference?)

I realize after reading this (http://www.asp.net/web-api/overview/extensibility/using-the-web-api-dependency-resolver) that these interfaces have changed, but I am not sure how to apply this change to how I use Autofac.

Do i need to wait for a new release from Autofac or is there another way I can get past this.

© Stack Overflow or respective owner

Related posts about asp.net-mvc-4

Related posts about autofac