Unable to open configSource file that was added as link

I added the post build event as suggested. But the exact steps are:

  1. Right click on the project and navigate to properties
  2. Click on the Build Events tab
  3. In the Post-build event command line: box I added:

xcopy /s "$(ProjectDir)\bin\Config" "$(ProjectDir)\Config"


After trying the xcopy solution, which failed, the follow worked for me:

Right click the cstrings.config, go to Properties.

Set the property Copy to Output Directory value to Copy always


Finally I found what was the issue. When use Copy always, files are copied to bin folder. But files are searched in the virtual directory not in the bin. So I added post build task which copies files to correct destination.


I suffered from the same problem. In my case, config file's 'Build Action' property was the cause. ( Right click on the config file > Properties > Build Action )

The 'Build Action' value was set to 'None'. After I changed it to 'Content', the problem sovled. ( I am not sure if it was 'a Visual Studio's bug' or 'my click-by-mistake' that made it set to 'None'.