rocky050371
asked on
Config Location + 500 pts
If I have an application which references several dlls and they are located in the same folder, then it is possible to read settings from the config file, does it automatically look in the main folder for a config file?
The reason I ask is that I am also making provision for a web service which also references the dlls, do I just need to copy the config file to the web service directory?
The reason I ask is that I am also making provision for a web service which also references the dlls, do I just need to copy the config file to the web service directory?
ASKER
The point I am trying to raise, is, the dll automatically pick up the main application config, would this be the same if the dll was in the web service directroy, if I dropped the application config in there
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The configuration files are expected to be in the runpath where assemblies built. The default application config file, yourApp.exe.config is generated by VS 2005 when you build the project based on the app.config. If aop.config is not there in your project, just add the file. After Building, you will get ApplicationName.exe.config
To copy a file in project to a specific folder while building you can use custom build events like you write on a batch file (e.g. xcopy .... ....)