无法解析Unity container.LoadConfiguration()

时间:2019-06-26 10:54:38

标签: unity-container

在container.LoadConfiguration()上获取错误。它说“ Unity.IUnityContainer”不包含“ LoadConfiguration”的定义

我已经在顶部使用Unity.Configuration添加了

public static void RegisterTypes(IUnityContainer container)
{
    // NOTE: To load from web.config uncomment the line below.
    // Make sure to add a Unity.Configuration to the using statements.
    container.LoadConfiguration();

    // TODO: Register your type's mappings here.
    //container.RegisterType<ISearchService, SearchService>();
}

我正在使用最新版本的Unity v5.11.1

0 个答案:

没有答案