Thank you for your response. Path is most certainly not the problem here because:
1. I know app.config is being read correctly because it has some connectionstrings and WCF settings that drive Entities and Web Services setup both of which are working correctly.
2. I have the problem even if I took all of logging.config and stuck it in app.config. I copy over logging.config to the bin directory which is where exe.config for the Windows Service gets written. So if it can read
app.config, it should be able to find logging.config. I even tried turning requiredPermission to false thinking that there could be a trust issue since Windows Service runs under a low level id.
3. I did give your solution a shot, and it did not fix the problem.
So, to answer your question about what is exactly is the problem we are trying to solve:
I think the key problem is making logging settings work through configuration files (never mind separating out logging settings into a separate configSource). So far, I have not had this problem because I was doing all container setups through code rather
than config files. I suspect
that if I attempt to setup the unity container through config files I am going to run into a similar problem. Obviously, I am missing some basic step.
Here is the code I have in my windows service Main(). This is probably more information than you need; if I took out loggingConfiguration from the equation, everything works just fine. So there is probably some
problem when executing .AddNewExtension<EnterpriseLibraryCoreExtension>():
private static void Main()
using(IUnityContainer container=new UnityContainer())
.AddMatchingRule(typeof(TagAttributeMatchingRule), new InjectionConstructor("MyMethod"))
container.RegisterType<IRepository, Repository>("entity",new ContainerControlledLifetimeManager());
EnterpriseLibraryContainer.Current = new UnityServiceLocator(container);