I have defined my configSource to look for config files in a sub-directory called config, as follows:
<connectionStrings configSource="config\ConnectionStrings.config" />
I have the config file defined as a linked file, so when the build happens it gets copied into my bin\config folder just fine.
However, my web app projects are looking at the development project config folder instead of the deployment bin\config folder. I confirmed this with Process Monitor.
So I have several questions:
- Why is it looking there instead of bin\config - did I miss a relative path setting somewhere?
- The linked files are not copied there but to bin only. My understanding is that this is the proper behavior. Is that a correct assumption or should it be copied to both locations? If so, what is the setting to enable that?
- Is it good practice to use a sub-folder for linked files or should I leave them in the project root?
Thanks much!
UPDATE: I am using the method described here: http://consultingblogs.emc.com/jamesdawson/archive/2008/06/03/using-linked-files-with-web-application-projects.aspx to ensure that the config files are copied, and doing a little experimentation I have answered question #2. No it is not default behavior in Visual Studio but this work-around ensures the files are copied to both locations.