0
votes

Our project is using a common class library project which reference enterprise library 3.0 for logging. We want to upgrade the EL to 5.0. For this, we installed Enterprise Library 5.0, added new logging block in the web.config file using the config tool. We removed the previous references to 3.0 dlls in the project. After that we added the following dlls from location - C:\Program Files\Microsoft Enterprise Library 5.0\Bin 1.Microsoft.Practices.EnterpriseLibrary.Logging.dll 2.Microsoft.Practices.EnterpriseLibrary.Common.dll

We also registered the latest dlls (5.0) in GAC and uninstalled previous versions there. However, we are getting the following error while running the app: "Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. "

Please help :)

1

1 Answers

2
votes

It appears that you have still references to version 3.1.0.0 of the Enterprise Library assemblies in the config.

Try the following:

  1. Use a text editor to completely remove the Version, Culture, and PublicKeyToken attributes from every Enterprise Library element that contains these attributes.
  2. Open your configuration file in the Enterprise Library version 5.0 configuration editor and then save it. This will add the correct version, culture, and public key token values to each element.

Also, check out the Migration Guide.