Last week I finally had some time to upgrade an old project from Enterprise Library 3.1 to Enterprise Library 4.0. I got most issues solved immediately but one issue took a lot more time to solve. When running the application I got the following error:
System.Configuration.ConfigurationErrorsException, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Message : The type attribute does not exist on the element name.
After comparing a newly created Enterprise Library 4 config file with the existingconfig file, I found one important difference. When you are using the Enterprise Library cache manager you need to add type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching" attribute to all the <add/> elements in the <cacheManagers/> collection.
Or maybe it’s just time to move on to Enterprise Library 5.0.