IUnityContainer.Resolve throws error claiming it cannot be used with type parameters

前端 未结 5 776
陌清茗
陌清茗 2020-12-22 23:46

Yesterday I\'ve implemented the code:

CustomerProductManager productsManager = container.Resolve();

It was co

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-23 00:18

    I faced this problem and none of this answers did not help me. I was getting the compile time error

    Unknown method RegisterType() of Microsoft.Practices.Unity.IUnityContainer

    for my below code.

    Container.RegisterType();

    I found that if you did not implement IMyInterface to the class MyClass, you get this issue. Hope it resolves for you too...

提交回复
热议问题