What I am doing:
- Create new WPF Application project
- Add App.config to the project
- Build project
- Open App.config properties and set 'Copy to output directory' parameter to 'Do not copy'
- Make some changes to App.config
- Go to
bin\Debug
folder and set read-only attribute to file WpfApplication1.exe.config - Rebuild project
Result:
Error 2 Unable to copy file "App.config" to "bin\Debug\WpfApplication1.exe.config". Access to the path 'bin\Debug\WpfApplication1.exe.config' is denied. WpfApplication1
Why VS still trying to copy the file, and how to force it to stop doing this?
P.S. I'm debugging my app on several remote computers (switching between them as needed) and each one should have it's own configuration. That's why I don't want VS to overwrite configuration on each build.