Migration Enterprise Library 3.1 to 5

Topics: Enterprise Library Core, General discussion
Jul 14, 2010 at 10:47 PM


I have a project in VS2005 that references the assembly Microsoft.Practices.EnterpriseLibrary.Common of version 3.1, use of attributes found within Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder, at the time of migration to Enterprise version 5 I find that all classes that existed within ObjectBuilder have been removed, can please give me a guide in the process I followed to successfully complete the migration of my application.

Thanks for your help

Jul 15, 2010 at 5:55 AM


What specific classes are you using in Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder? As far as I know some stuff has already been removed and some are placed somewhere. For the migration guide you can refer to Microsoft Enterprise Library 5.0 Migration Guide that can be downloaded here.

Gino Terrado
Global Technology and Solutions
Avanade, Inc.


Jul 15, 2010 at 7:43 PM

Hi, thanks for your reply,

Below I list the classes that are doing me no because I have a component that makes direct reference to this assembly:

  • ICustomFactory
  • [CustomFactory(typeof(XXXXXXXXX))]
  • IInstrumentationEventProvider
  • ConfigurationReflectionCache
  • LocatorNameTypeFactoryBase<XXXXX>

Another problem I have is, in my application I am using the Resource Application that uses the same version 3.1 for example use the line of code [Assembler (typeof (CustomProviderAssembler <IResourceProvider, ResourceProviderData, CustomResourceProviderData>))] that exists in the AssemblerAttribute.cs class of version 3.1, now when I change the reference from the version 5 shows the error, my cuetion is in the version 5 give support to the Resource Application Block.


Thank you.

Jul 16, 2010 at 2:57 AM
Edited Jul 16, 2010 at 3:16 AM

The Resource Application Block is no longer included as part of EntLib Blocks since version 4.0 but is available in the EntLib Contrib project.

With regards to the classes you're using, I'm afraid there aren't any replacement for each of the classes.  If you could tell me what is your requirement for using each, I might be able to help.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.

Jul 22, 2010 at 3:50 PM

Thanks for your help,

Reviewing the sources indicated I determined that the Resource Application Block 4.1 makes use of the classes still exist in the ObjectBuilder of Commons that in version 5 does not exist.

I need to compile the Resource Application Block with the version 5 that I can give recommendations to reach this compilation is correct,
to obtain a similar result the Resource Application Block exist in the EntLibContrib 4.1.

An additional question that there is an Application Block directly give me the use of instrumentation, had a component used ObjectBuilder classes do not exist now in version 5 for giving me the use of instrumentation. For example, I used the following code


internal class MeImpl: IInstrumentationEventProvider






Jul 22, 2010 at 7:22 PM

I would recommend asking these questions over on the EntlibContrib forum. The Resource Block isn't part of Entlib proper, it's an extension. I'm sure the contrib folks (they're a different, volunteer group of non Microsoft people) have been thinking about how to port stuff to Entlib 5. They may already have some answers for you.

The instrumentation stuff in Entlib 5 has been radically changed - it's not just the ObjectBuilder stuff that's gone, the instrumentation listeners are gone, there's no separate wireup strategy, and the instrumentation providers are now just simple dependencies. In general, things in Entlib are wired out now using the DI container, and configured using something called a type registration provider. You can look at any of the config sections in Entlib 5 to see how type registrations are done.

Can you give more details on what this custom instrumentation block of yours does and how it works? I'm sure it's pretty easy to get working once I have more details.