I had one of those annoying problems when you don't know enough about a library to know if you have coded it correctly or not!

I have registered a number of IFileServerManager types in StructureMap and trying to inject them into the constructor of a FileManager as ICollection. StructureMap says this will automatically resolve according to this: http://structuremap.github.io/the-container/working-with-enumerable-types/

The problem is, it doesn't. At least not in my program. All the other types work but ICollection doesn't so the solution was simply to change the constructor injection to IList instead and it worked fine.

Hmmmm