In my case, I create a window service with a name, for example, "SomethingService", inside which is located the file "App.config". After compilation, the output includes the following:
- App.config
- SomethingService.exe
- SomethingService.exe.config
"SomethingService.exe.config" is actually a copy from "App.config", so for "App.config" it makes no sense. Based on How not to copy app.config :

I set these properties, and the result is:
- No additional "app.config"
- "SomethingService.exe.config", which is a copy of "App.config"
as expected.
source share