为什么我的HttpConfiguration类型没有使用.Net MVC 4和WebApi的ServiceResolver类型?

Aca*_*uza 6 asp.net-mvc asp.net-mvc-4 asp.net-web-api

我正在使用带有WebApi的.Net MVC 4以及解释如何使用DI Container的所有文章,其中包含Global.asax中的以下配置行:(http://blog.ploeh.dk/2012/03/20 /RobustDIWithTheASPNETWebAPI.aspx)

GlobalConfiguration.Configuration.ServiceResolver.SetResolver(...)
Run Code Online (Sandbox Code Playgroud)

但在我的应用程序中没有ServiceResolver输入:

在此输入图像描述

用intellisense:

在此输入图像描述

我做错了什么?

Dar*_*rov 13

它已DependencyResolver在RC中重命名为:

GlobalConfiguration.Configuration.DependencyResolver = ... your custom DR
Run Code Online (Sandbox Code Playgroud)