Downgrading win app to 2.0 framework. Problem

Topics: Logging Application Block
Jul 6, 2009 at 3:25 PM

Hi,

I'm using V4.1 of the Enterprise Library for logging and Cryptography.  I've had to downgrade my win app to version 2.0 of the framework but now I get this error:

 

System.TypeInitializationException: The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
   at System.ModuleHandle.ResolveMethod(Int32 methodToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount).........

 

It appears to be looking for V3.5 of the framework.  I tried re-adding the references under the .Net tab so that I was using the Strong named assemblies but I got a pop-up saying that I needed to upgrade the framework.  Do I need to install an older version of the Enterprise library to get it to work with 2.0 framework?

 

Jul 7, 2009 at 12:35 AM

EntLib 4.1 has a Framework 3.5 dependency.  So you will need to re-reference v3.1 of the EntLib's Logging and Crypto dlls.  U'll also need ObjectBuilder2.dll as well of the 3.1.  I am not sure of the schema changes, so i would re-run the 3.1 config tool for EntLib to ensure that it's still legit.

Jul 7, 2009 at 10:15 AM

Thanks,

 

Seems to have done the trick.