I have searched on this discussion board and found a similar topic though it didn't answer my question.
I upgraded one of my projects to use entlib 5.0 and since then, I've been having issues using a file configuration source.
I have two projects. One is a forms app and is working fine without change.
The other is a windows service and has an identical configuration:
Here is the main config snippet
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<enterpriseLibrary.ConfigurationSource selectedSource="File Configuration Source">
<add name="File Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
<add name="System Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
In my external config I have PIAB, logging, and database configs. The SECOND I hit something that would read the config I get FileNotFoundException. I dug a little deeper using Process Monitor and found that it's looking in C:\Windows\System32\EntLib.config
for the config. This is perplexing. I tried ./EntLib.config and .\EntLib.config. Neither work. I then put an absolute path and everything worked properly.
I don't have this problem when using a forms app that has the EXACT same config.
I was thinking that it might have something to do with the process account that's running the service. Though, the relative path should always be based on where the application is running and I'm 100% positive the config is in my bin\Debug folder and
the service is pointing at that directory.
Was there a change in EntLib 5 that I'm not aware of? I read the change docs and didn't see anything about this. Everything was working fine (and is still working fine in production) before I moved over to the new version.
Any help would be appreciated. Thank you.