While we build project it will automatically create App.Config file...
But in case when we are not using this .Config file, so is there any way to stop create App.Config file.
While we build project it will automatically create App.Config file...
But in case when we are not using this .Config file, so is there any way to stop create App.Config file.
If the selected answer doesn't work for you, i.e. App.Config
file still keeps getting created, then you likely have the Auto-generate binding redirects selected in your Project -> Properties.
In this case, you can uncheck and save this setting, and then remove the app.config
file ans save the project.
This solves the problem.
if you are not using it at all, just remove it from your project and it won't get created anymore.
In my case I am creating a window service which has a name like "SomethingService", inside this, there is an "App.config" file. After compilation the output includes the following:
"SomethingService.exe.config" is actually a copy from "App.config" therefore there is no use for "App.config". Based on How not to copy app.config:
I have set these properties and the result is:
just as expected.