EntLib Config Tool - Admin rights required for Custom Trace Listener

Topics: Logging Application Block
Dec 17, 2012 at 1:04 PM

I was experimenting with creating a Custom Trace Listener and I finally got the Design Time features to work so that I can edit the properties of my custom listener in the EntLib Configuration Tool. I was doing this experimentation at home on my personal computer where I have admin rights on the machine.

I was thinking about implementing a similar Custom Trace Listener in my Enterprise Environment but we do not have local admin rights in our environment. I was wondering if there is any other way to get the design time features to work without having to put my .dll in the "C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin" directory.

Dec 17, 2012 at 4:38 PM

For application development my preferred method is to use the EnterpriseLibrary.Config extension.  This integrates into Visual Studio and lets you specify an arbitrary Enterprise Library binaries path (on a solution level) which let's you set multiple search paths to look for Enterprise Library assemblies E.g. if you are using Nuget you might see something like this: 


This let's you append any path you want to pick up custom assemblies or even custom Enterprise Library builds.

Another alternative would be to install/deploy Enterprise Library into a non-admin location.

Randy Levy
Enterprise Library support engineer
Support How-to 

Dec 17, 2012 at 7:29 PM
Edited Dec 17, 2012 at 7:49 PM

Maybe I am missing something but I believe EnterpriseLibrary.Config is exactly what I am using (see screenshots below).

1) The "Logging" project holds my custom trace listener and associated configuration class so that I have design-time support using the EnterpriseLibrary.Config tool. The "SysloggerTest" project is a Console Program that I have configured to use my custom trace listener for logging. (This was configured using EntLibConfig.exe on a machine outside of my corporate environment in which I was able to write to the "C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin" directoy).


2) This is the error I get when I try to open the app.config under the "SysloggerTest" project with EntLibConfig.exe.


To summarize: I am able to use my custom trace listener within my application no problem and the logging works. My issue is that the EnterpriseLibrary.Config tool itself wont have design time support unless I can copy my custom .dll into the \Bin directory of the EntLibConfig.exe install.

Edit 1: I was mistaken - I am not able to run the program either

Edit 2: Cool - It looks like the EnterpriseLibrary.Configuration extension is what I need

Dec 17, 2012 at 8:22 PM

Ok - I guess I was wrong. I set the "Enterprise Library binaries paths" to:

GlobalSection(ExtensibilityGlobals) = postSolution
     EnterpriseLibraryConfigurationToolBinariesPath = C:\Users\xxxxxxx\Desktop\SysloggerTest\Logging\bin

and it still doesnt work. Same error as screenshot 2 above,

Dec 17, 2012 at 10:32 PM

It should work as long as you have all the assemblies in the C:\Users\xxxxxxx\Desktop\SysloggerTest\Logging\bin directory and that the configuration has the correct type information.  So the C:\Users\xxxxxxx\Desktop\SysloggerTest\Logging\bin should have the following assemblies:


You can also take a look at the Sample Trace Listener project: Samples.TraceListeners.zip which is configured to use the configuration tool with the binaries path.

Randy Levy
Enterprise Library support engineer
Support How-to