Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why my HttpConfiguration type has no ServiceResolver type using .Net MVC 4 with WebApi?

I'm using .Net MVC 4 with WebApi and in all articles that explain how to use DI Container with that has the following line of configuration in Global.asax: (http://blog.ploeh.dk/2012/03/20/RobustDIWithTheASPNETWebAPI.aspx)

GlobalConfiguration.Configuration.ServiceResolver.SetResolver(...)

But in my application has not ServiceResolver type:

enter image description here

with intellisense:

enter image description here

What I'm doing wrong?

like image 505
Acaz Souza Avatar asked Jul 28 '12 03:07

Acaz Souza


1 Answers

It's been renamed to DependencyResolver in the RC:

GlobalConfiguration.Configuration.DependencyResolver = ... your custom DR
like image 84
Darin Dimitrov Avatar answered Oct 06 '22 05:10

Darin Dimitrov