Resolved: Unable to open configSource file when debugging a program

Problem:

When debugging a program, met an error:

Unable to open configSource file.

Unable to open configSource file.

Cause:

The program conigures the trace listeners outside of the App.Config in a separate configuration file, and specified the separate configuration file name inside the App.Config. But the program was started from the bin\Debug folder when debugging, where the separate configuration file is not in.

Resolved: Unable to open configSource file when debugging a program

Solution:

You can copy the separate configuration file manually into the bin\Debug folder to resolve this problem. Or you can set the that configuration file’s “Copy to Output Directory” property to “Copy always” to save the manual work.

Resolved: Unable to open configSource file when debugging a program

Add comment

Loading