Logging with Enterprise Library in TFS-Build doesn´t work

Topics: Enterprise Library Core, Logging Application Block
Jun 10, 2013 at 9:20 AM
does everybody know, wether it is necessary to install the Enterprise Library Package on the Build Server so that Logging will work, because we have the Problem that in an ASP.NET Solution the Logging from a Visual Studio - Build works fine but it doesn´t work in the same Solution which is built with TFS.
The Builds from VS an TFS contains similar files (References) and we don´t get any build-errors.
We recognized that the default IIS-errorpage is called instead of our custom-errorpage and the error is not written to the eventlog.

Any help would be greatly appreciated.
Jun 11, 2013 at 3:27 PM
In terms of an application, Enterprise Library is just a collection of assemblies. References will need to be resolved during compilation. At runtime the assemblies will have to be located and loaded by the .NET runtime.

My first thought would be to ensure that Enterprise Library versions are the same on dev machines, build machines, and in the deployment environments. If different versions are referenced this could cause issues. It is also important to verify that the version of assembly references match the version defined in XML configuration files.

Also, check the GAC for any rogue Enterprise Library assemblies.

In general you could also:
  • Compare the deployment packages/builds between TFS and VS and look for differences (e.g. what version is referenced in your application's assembly manifest)
  • See if there are any missing assemblies/binding errors at runtime by using fuslogvw
  • Debug the TFS build to see what is actually going on (any exceptions?)
Not sure what your setup is but as general reading you could take a look at Managing Source Control Dependencies in Visual Studio Team System

Randy Levy
Enterprise Library support engineer
Support How-to