DryIoc with MediatR: IAsyncRequestHandler Resolve exception

霸气de小男生 提交于 2019-12-12 06:38:36

问题


DryIoc can't seem to Resolve a IAsyncRequestHandler.
It throws
"An exception of type 'DryIoc.ContainerException' occurred in DryIoc.dll but was not handled in user code Additional information: Unable to resolve MediatR.IRequestHandler. Where no service registrations found and number of Rules.FallbackContainers: 0 and number of Rules.UnknownServiceResolvers: 0"
which is weird because it should be resolving a IAsyncRequestHandler.
Another weird thing is that the code runs well on Net.Fiddle (check here)

I'm using VS 2015 Update 3 in Windows 10 Home, MediatR 3.0.0, DryIoc.dll 2.10.0, .Net framework 4.5 (also tried with 4.6.1).

Am I registering it in a wrong way? This should be straightforward.

Related: What is the best way to register all handlers?

来源:https://stackoverflow.com/questions/42177973/dryioc-with-mediatr-iasyncrequesthandler-resolve-exception

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!