entlib5.0 with .NET 4.0

Topics: Exception Handling Application Block, Logging Application Block
Jul 23, 2012 at 6:15 PM

I am using Enterprise Library 5.0. The application crashes and it is looking for some


Looks like a compatibility issue between Enterprise 5.0 and .NET 4.0.


Any suggestions?

Jul 23, 2012 at 9:05 PM

Can you be more specific?  E.g.:

  • What specific exception are you getting? 
  • What does your code look like?
  • What is your configuration?
  • What assemblies are you deploying?
  • What type of project are you developing (e.g. Silverlight, WCF, ASP.NET, etc.)?

Enterprise Library 5.0 supports .NET Framework versions 4.0 and 3.5 SP1.

Randy Levy
Enterprise Library support engineer

Jul 24, 2012 at 9:06 PM

Specific Exception:

Application crashes. - No Exception.

Code:Logger.Write(LogEntry object) being passed inside.

Configuration:  windows 8

Assemblies: Microsoft.Practices.EnterpriseLibrary.Logging.DLL, Microsoft.Practices.ServiceLocation.dll, Microsoft.Practices.EnterpriseLibrary.Unity.dll

project: C# .NET Windows forms

Aug 2, 2012 at 4:05 AM

Are you running on Windows 8?  Enterprise Library has not been tested with Windows 8 so there definitely could be issues.  

Randy Levy
Enterprise Library support engineer

Jan 11, 2013 at 11:22 AM

I've the same problem as stated above when using EntLib on Windows 8. Is there anything I can do to work around this problem? I already tried to hook into the AssemblyResolve event but without the actual .dll to load that's not very helpful.

I assume this problem will also occur on Windows Server 2012 based systems? (I didn't have the time yet to test the behavior there...)

Jan 11, 2013 at 1:21 PM

Can you elaborate on the exact scenario to reproduce the issue?   e.g. what is the system locale?  Perhaps create a small application that reproduces the problem.

I ran a Windows Forms app targeting .NET Framework 4 Client Profile that wrote to flat file trace listener and it runs fine on Windows 8.

Randy Levy
Enterprise Library support engineer