This is a quick troubleshooting guide in case anyone bumps into Structuremap issues when using EpiFind. On a recent project, when we tried to load the Find UI, the editor crashed with this exception:
An error has occurred.","ExceptionMessage":"An error occurred when trying to create a controller of type 'EditorialBoostingController'. Make sure that the controller has a parameterless public constructor
I've used EpiFind many times and ut-of-the-box, it works with a structure map with no qualms. In this instance, we got the dreaded 'parameterless error'. If you get this, it means that StructureMap has got its knickers in a twist and it doesn't know how to resolve something. In this case, it's the client parameter. Jonas Bergqvist pointed me in a useful direction.
If you find yourself in a similar situation, in your structure map set-up code, you can manually create a concrete instance of the client. This is done like this:
This should fix the error. Happy Coding 🤘