Using Enterprise Library 4.1 in SharePoint 2007 development projects

Yes, you CAN use Enterprise Library 4.1 (https://msdn.microsoft.com/en-us/library/cc467894.aspx) in your SharePoint 2007 development projects. Here is how:

  1. Install .NET Framework 3.5 if it is not present on SharePoint servers. EntLib 4.1 is based on 3.5 framework.
  2. Enable 3.5 for MOSS applications. MOSS 2007 was released before 3.5, so even if you have 3.5 on the servers, it won't know it and take advantages of it until you ask it to. To let MOSS 2007 to leverage 3.5, you need to modify its web application's web.config. Here is a blog that you can follow: https://blogs.msdn.com/chabrook/archive/2008/06/11/enabling-moss-to-use-net-3-5.aspx
  3. Deploy Enterprise Library bits to the SharePoint servers. I would recommend GAC deployment. You also want to use the out-of-the-box signed DLLs.
  4. Now you can modify web.config of your web applications to use EntLib. I recommend to use the Enterprise Library Configuration Utility to manage your EntLib configurations. Of cause, you need use feature receiver or some other mechanisms to propagate the changes for multi-server farms.
  5. Enjoy EntLib!

I have a webcast on this topic on MSDN China at https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&EventID=1032420504&CountryCode=US. You are welcome to watch it if you happen to speak Mandarin Chinese.

Zewei Song, Ph.D.

MCPD, MCTS: .NET 3.5, MOSS AppDev, Configuration

Enterprise Services, Microsoft Corporation