I defined my configSource to search for configuration files in the config subdirectory, as follows:
<connectionStrings configSource="config\ConnectionStrings.config" />
I have a configuration file defined as a linked file, so when the build happens, it just gets copied to my bin \ config folder.
However, my web application projects are looking at the configuration folder of the development project, not the bin \ config folder. I confirmed this using Process Monitor.
So, I have a few questions:
- Why is he looking there instead of bin \ config - did I miss the path of the relative path somewhere?
- Linked files are not copied there, but only in bin. I understand that this is the correct behavior. Is this the correct assumption or should it be copied to both locations? If so, what is the setting to enable this?
- Is it good to use a subfolder for linked files or leave it in the root of the project?
Thanks a lot!
UPDATE: I use the method described here: http://consultingblogs.emc.com/jamesdawson/archive/2008/06/03/using-linked-files-with-web-application-projects.aspx to copy the configuration files, and experimenting a bit, I answered question No. 2. No, this is not the default behavior in Visual Studio, but this work ensures that the files will be copied to both locations.
Shane source share