Where did EnterpriseLibraryContainer go in 6.0?

Jun 27, 2013 at 1:07 PM
I was trying to upgrade from EnterpriseLibrary 5 to 6, but when I update Common it seems as though the EnterpriseLibraryContainer no longer exists. Now I didn't write this code so I don't really know what it's doing, but did this class get moved somewhere else? Or renamed? Or is it dead for some reason?

Is there any upgrade doc that describes these sorts or breaking changes and what to do about them?

Jun 27, 2013 at 1:22 PM
Edited Jun 27, 2013 at 1:23 PM
EnterpriseLibraryContainer was removed in version 6. It is one of the Breaking Changes from the Release Notes:
The EnterpriseLibraryContainer class no longer exists. You must now explicitly bootstrap the blocks in your code now that Enterprise Library no longer relies on Unity to perform this function.
Yes, there is a Migration Guide to help.

Basically, if you are using configuration you need to bootstrap the blocks:
LogWriterFactory logWriterFactory = new LogWriterFactory();
var logWriter = logWriterFactory.Create();
The Developer's Guide also contains instruction and code samples.

Randy Levy
Enterprise Library support engineer
Support How-to
Marked as answer by randylevy on 10/7/2013 at 11:13 PM
Jun 27, 2013 at 4:34 PM
Thanks, that's the sort of info I was looking for.