I'm using Unity and Ent Lib 5.0 Logging block in asp.net mvc project and I had registered Ent Lib classes with Unity using EnterpriseLibraryCoreExtension. Now I'm trying to upgrade to Ent Lib 6 but cannot find EnterpriseLibraryCoreExtension. Can you please
help? Is there another pattern to follow?
EnterpriseLibraryCoreExtension has been removed in the latest version. From the
The Enterprise Library blocks no longer use the Unity container to resolve instances. You should
remove all calls to the AddNewExtension<EnterpriseLibraryCoreExtension> method of the
Unity container from your code. If your application currently resolves Enterprise Library objects
from the container, you must either manually register the required types in the Unity container,
or modify your application to use the static facades in the blocks to configure and retrieve the
Enterprise Library objects your application uses.
So for logging you could do something like this:
IConfigurationSource configurationSource = ConfigurationSourceFactory.Create();
LogWriterFactory logWriterFactory = new LogWriterFactory(configurationSource);
Enterprise Library support engineer