I added a new Proejct to solution on top of template given by aspnetboilerplate.com. i added a class like following
using Abp.Dependency;
public class CardManager: ICardManager, ISingletonDependency
{
.
.
.
}
My Application Project service class(CardAppService) has dependency on this class and on my Unit Test _cardAppService = Resolve<CardAppService>(); it fails saying An exception of type 'Castle.MicroKernel.Handlers.HandlerException' occurred in Castle.Windsor.dll but was not handled in user code
Additional information: Can't create component 'EMR.Card.CardAppService' as it has dependencies to be satisfied.
'EMR.Card.CardAppService' is waiting for the following dependencies: - Service 'EMR.Manager.Service.ICardManager' which was not registered.
i was in a impression that if you have ISingletonDependency or ITransientDependency it gets registered up automatically.
1 Answer(s)
-
0
Found out that you need to use per project
: AbpModule { public override void Initialize() { IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly()); }