Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

castle.Microkernel.componentnotfoundexception #926


User avatar
0
bluedwarf created

Hi guys! I have a little problem testing my Boilerplate project. I'm following this guide <a class="postlink" href="http://www.codeproject.com/Articles/871786/Unit-testing-in-Csharp-using-xUnit-Entity-Framewor">http://www.codeproject.com/Articles/871 ... y-Framewor</a>

but when i test my app i have this error: castle.Microkernel.componentnotfoundexception no component for supporting the Domec.CompanyTools.Tests.CompanyToolsDbContext was found.

Can you help me? (Thank you for the support!)


4 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Does your dbcontext derive from AbpDbContext?

  • User Avatar
    0
    bluedwarf created

    Yes, tnx for the reply

  • User Avatar
    0
    hikalkan created
    Support Team

    Maybe your entityframework module is not being initialized. you can add a breakpoint and run test in debug mode.

  • User Avatar
    0
    guillaumej created

    In my case , I got this exception because I was not adding a Module. I copied the one from the generated test project, and it worked.

    I was thinking it was unneeded for testing an application services, seems I was wrong.