Enterprise Library 6.0

I’ve written on my blog before about the Microsoft Enterprise Library.  Enterprise Library has a long and accomplished history of providing architectural guidance, recommended practices, and reusable components to help developers, architects, and IT professionals efficiently build line-of-business (LOB) systems. Over the years, it's achieved a significant reach, seeing over 4 million downloads and powering many industrial systems.

I’m excited to share that the patterns & practices team has just released Enterprise Library 6.0. This new version not only includes new reusable components (called “application blocks”), but also extends the library’s integration with other technologies (such as with ASP.NET MVC and ASP.NET Web API) and simplifies its learning and usage.

While this 6.0 release is filled with great things to talk about, I want to highlight three in particular:

  • .NET 4.5 saw the introduction of the EventSource class, which dramatically simplifies the task of doing ETW tracing in managed applications (ETW, or Event Tracing for Windows, is a fast and scalable logging mechanism built into the Windows operating system).  Enterprise Library 6.0 includes the new Semantic Logging Application Block, which enables you to have the simplicity and power of EventSource while still utilizing log formats and storage facilities you’re familiar with.  With this block, you can easily direct your log messages to a variety of destinations, such as rolling flat files, SQL Server databases, or Windows Azure table storage, while still maintaining the structured nature that ETW and EventSource provide.  This structure makes it much easier to later aggregate, query, and process the information you've captured.
  • LOB apps are more and more likely to be running in distributed environments, where intermittent error conditions are not uncommon.  The updated Transient Fault Handling Application Block, which helps to provide resilience against such conditions, has been updated with new detection strategies and with support for the new asynchronous programming features of C# 5 and Visual Basic 11, enabling increased scalability.  It’s also now available as a portable library for use with .NET 4.5, Windows Store apps, and Windows Phone apps.
  • Previous releases of Enterprise Library have included Unity, a lightweight and extensible dependency injection container that facilitates building loosely coupled applications.  With this release, it’s seen several important enhancements, including support for Windows Store apps.

As has been the case with Enterprise Library in the past, you can easily add to your projects just the blocks you need by using the NuGet package manager in Visual Studio:

You can check out the Enterprise Library at http://entlib.codeplex.com.


Follow me on Twitter at https://twitter.com/ssomasegar.

Comments (33)

  1. Ladislav says:

    Why don't you support .NET 4? Our customers are using 3.5 and won't update any soon.

  2. Ricardo Quintanilla says:

    yea!!! time to start playing again.

  3. gmelnik says:


    EntLib6 and Unity3 rely on the .NET framework features which were introduced in v4.5. For example, the new Semantic Logging Application Block builds on top of the System.Diagnostics.Tracing.EventSource (msdn.microsoft.com/…/system.diagnostics.tracing.eventsource.aspx) for production logging, while Unity3  uses the new Reflection API (msdn.microsoft.com/…/system.reflection.typeinfo.aspx).

  4. Chris Marisic says:

    I'm sorry to be this overtly critical but the SLAB, is just terrible. I was looking at channel9.msdn.com/…/Introducing-Semantic-Logging showing this in use. Who would ever want to create that events class? It has 42 op codes?! WTF? You need to attribute methods with numbers that tie to something? To what? I don't know, and the numbers need to match inside the method that are decorated in the attribute? Double WTF?

    Who dreams up that any person would ever want to use these?

  5. David V. Corbin [Microsoft ALM Ranger] says:

    This is indeed an exciting release. I can't believe how far this package has come since it was introduced. I started basing cross-cutting concerns on these implementations around 8 years ago!!! (Where did the time go??)

  6. gmelnik says:


    Thanks for the feedback. We are not surprised by your reaction. SLAB requires a shift of how one thinks about logging. It forces you to separate what to log, from how to log it, from where to log it. It also puts the effort in the right place. So, while it may appear that you need to do more upfront, the benefits that you get once you need to process those logs are huge. Yes, it requires a deliberate effort, but in a way it’s like healthy eating — requires you to plan and cook your meals properly as opposed to consuming fast food.  

    SLAB was produced in close collaboration with developers and IT/pros to address the pain of dealing with logs that many developers do not encounter after shipping.

    Your observations about authoring an EventSource subclass and the opcodes are actually characteristics of the EventSource itself (msdn.microsoft.com/…/system.diagnostics.tracing.eventsource.aspx). Without repeating all the reasons why you’d want to be using EventSource, I strongly suggest you taking a look at this post by Vance Morrison (blogs.msdn.com/…/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx).

    Secondly, you don't need to use all the ceremony when defining the events. Most additional event metadata is optional, although you limit the usefulness of the generated events if you don't supply it. At the end of the day, it’s your choice.

    Thirdly, using EventSource and SLAB is about generating information that is useful to the application's administrator. The event IDs (a.k.a. "numbers") and the fact that the payload is composed of discrete pieces of information allows the IT pro to effectively consume/parse the information, potentially automating this consumption. And precisely because there is room for mismatches when authoring an EventSource, SLAB provides tools to validate them. Note that because of the way ETW works (there is a manifest and code producing the events) there's always some duplication of information; the good thing about event sources is that this duplication happens in the same place and you can check for its correctness.

    Lastly, yes, there are extra classes and methods but they lead to a better organized instrumentation contract. It's certainly easier to sprinkle "log.Warn()" calls in your application code, but that does not mean they are as useful as they could be. And these kind of calls usually flatten the relevant information at its point of origin, both resulting in overhead if the information is not going to be consumed and pollution of the business logic code (unless you factor the formatting out to a separate method, in which case the result is not that different from an EventSource method).

    To answer the question of "who should use these?" we’d say a developer who considers the instrumentation of the application as something that is thoughtfully designed and built to be consumed as effectively as possible.

  7. George Carlisle says:

    Your going to get a fat bonus this year, S.

    Way to produce the hits!!

  8. Dave says:

    Great formalize techniques that are proven failures.  I am sure everyone wants  successes like Visual Studio, Bing and Windows 8 along with unhappy users that leave comments on your blog.

  9. Kustekakkesoep says:

    Dear mr boss,

    I just recently had found a bugg in the well known language c#. When you want to delete a row from your database through a passed datatable u just CANNOT, WHY I CANNOT EXPLAIN. You have to use a datagridview, WHY I CANNOT EXPLAIN. Dear mister boss, please solve this problem



  10. sebenscen says:

    I use this library only for connection with oracle, maybe i have undervalued it?

  11. Hi.  I did a cursory review of material currently available at http://entlib.codeplex.com (just reading titles and categories).  I'd like to request that the icon/tag <==NEW== be removed from being adjacent to the title links to articles, videos and resources that are two years old or older, i.e. almost everything that is currently tagged "new".  In the world of software development and the Internet, you're pushing-it to even dare to regard something 6 months as deserving of the tag "new".  Two or three years old? Not so much.

  12. LOL at comments says:

    but all is true. Microsoft shifts major POS recently… gets fat bonuses for nothing. Balmer must be sooo proud.

  13. gmelnik says:


    Fair enough, fixed now. The icon was one of those legacy artifacts that you end up glazing over after so many updates to the wikipages. Thanks for bringing it up. Any other feedback on the release itself?

  14. Does the Data Block now support the async/await keywords? I do not see any mention of this in the release notes.

  15. gmelnik says:


    We do support APM async methods in DAAB already, but we do not take advantage of the newer TAP versions of the ADO.NET methods in .NET 4.5. Feel free to add/vote on this story to our uservoice site for future updates – http://entlib.uservoice.com

  16. coder says:

    This is probably why I've been using ReflectInsight for the last few months.


  17. I have problem with downloads says:


    I know that this is not best place to send bug report but i am out of ideas where I can put that.

    When I  will go to http://www.microsoft.com/downloads I receive bing search for downloads – thats ok but there is no place when I can sort downloads by release date desc. As a matter of fact this is basic tool to find whats new and hot release 😉 now is completely useless 🙁   as I seein link there is sortby=+weight  could you please provide parameter which should I use to sort by date? (i tried +date 😉 it didn't work). I try to find area in technical help but I was overwhelmed by options and didn't find a place to put that simple bug report for download search.

    Thanks and best regards


  18. toub says:

    @"I have a problem with downloads":

    This link should give you the sorted list of all downloads:


    You can then sort it a different way if you like, as well as apply additional filters around download type, product category, operating system, etc.  I hope that helps.

  19. Adam says:


    thanks a lot !!

    When I use http://www.microsoft.com/…/default.aspx and I choose from menu Software  all downloads I always land on search.microsoft.com/…/DownloadResults.aspx where there is no possibility to sort by anything. Anyway url which you send works as expected – anyway its strange that there are two search downloads mechanizm with default set to limited one. 😉


  20. Marcello says:

    So. .. rest assured you can come back in a 7 years from now on and they will be discussing the same things over and over again.

  21. Amit says:

    I wonder how useful it really is! As of now MS has started terminating all certifications up to  .NET 4.0. They are not even getting upgraded. On the other hand they are pushing html5 and javascript with extreme madness! So its quite evident that MS is not really interested in .NET anymore.

    Why the developers are supposed to learn such complex APIs just to throw them away in couple years at the whim of some native code lovers inside MS?

  22. Srinivasan Hariharan says:

    Do you know how to use the Oracle with Library version 6.0.  I had tried so many places, I am not able to find.  I have used the Library version 4.1 and used oracle.  Your help  in this will be appreciated.

  23. @Srinivasan Hariharan, Oracle is still supported in the Data Access Application Block in Entlib 6. Just have in mind that in EntLib 6 there is a need for an explicit setup step. So when your application is starting, you'd need to call (only once):

      DatabaseFactory.SetDatabaseProviderFactory(new DatabaseProviderFactory(),false);  // during app startup.

    More information regarding Oracle is available in the Entlib developers' guide: entlib.codeplex.com/…/64243

  24. ursri says:

    Ent. Lib 6.0 is easy to learn and implement.  It appears Ent. Lib app. blocks are for win/web apps and not for win 8 store apps.  Nuget EntLib Common/Exception/Validation block installation to a Win 8 store app is unsuccessful with error.  An error "Microsoft.Practices.EnterpriseLibrary.Common.dll" could be added.  The project targets '.Net Core' while the file reference targets '.NETFramework'.  This is not a supported scenario." appears in case we refer to dlls (just to check feasibility though)

    Please suggest how best Ent Lib 6.0 app. blocks can be used in Win 8 store app.

    Thanks in advance


  25. gmelnik says:

    @ursri Thank you for your interest in EntLib.

    The only two blocks which can currently be used for Windows store app development are Unity and Transient Fault Handling Application Block (see the systems requirements – entlib.codeplex.com/wikipage).

    To help us prioritize future work on other application blocks, please describe your scenarios on http://entlib.uservoice.com

  26. ursri says:

    Thank Grigori for the guidance.   I shall work towards Transient Fault Handling Application Block and its objective.  I was wondering will there be any exception handling/validation/logging app. block support for .netcore/Win Store apps near future.  Please suggest.

    Thanks in advance


  27. gmelnik says:

    ursri, that is something we are considering. Can you elaborate on the concrete scenarios you care the most about to be supported? The uservoice site I referred you to earlier is the best place for that, as other users would be able to review them too and to comment/vote accordingly. All of those inform our future backlog.

  28. ursri says:

    Thank for the reply Grigori.   I shall mention it in http://entlib.uservoice.com.


Skip to main content