You see it as an app.config file at design time (in Visual Studio). When deployed (as well as in the bin directory), app.config becomes the binaryname.dll / exe.config file (automatically renamed to Visual Studio).
As for the exact reason ... there is a good reason not to have it as app.config ... for example, if you deploy multiple applications in the same directory, you can only have one application. config ... so there is good reason to call it binaryname.dll.config.
So the real question is: why is it called app.config and not binaryname.dll.config?
One of the reasons I can think of is that you can always change your binary output name in the project settings (so that the compiler generates an .exe file with a name different from your project name) and the configuration file will be copied according to with this is the binary name of the output. It is better to use it with the name app.config in the solution, because you always copy the same file name to any name of the target file, without having to rename this file in the solution (which is especially good when this file is under source control) . Perhaps there is another reason.
source share