.NET Config Files configSource outside the application directory folder

Another solution is simply to add the configuration file in all your projects as a link instead of actually copying the file to your projects. Then set the “Build Action” of the file to “Content” and “Copy to Output Directory” to “Copy if newer” and when you compile the project you will have the file in the output directory.

To add the file as a link in the “Add Existing Item” dialog box, there is an Add button with a dropdown. Choose “Add as link” from the dropdown on the Add button to complete the process.

Leave a Comment