Ninject.MockingKernel.Moq security exception

半腔热情 提交于 2019-12-04 16:48:02

I have been fighting the same problem for a little while now. See this thread to follow my effort: https://groups.google.com/d/topic/ninject/xInlcd2b1l8/discussion

Assuming that you are using NuGet you have two options:

  • Don't use Ninject.MockingKernel right now or
  • build it from source yourself.

Any way you may want to keep a tab on the project to use it via NuGet again once an updated version is available.

Late to the party, but this works:

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