Compile App.config XML file along with console.exe application C#

Surely I have missed something simple here. I used the link below to help me create a configuration file which I can use in my console application.

Simplest way to have a configuration file in a Windows Forms C# Application

    <add key="setting1" value="key"/>

I have built my console application, but can't see the app.config file anywhere. I'd like to edit this configuration file without recompiling.

Any idea on how to do this ? Basically, I'm passing the compiled console app to someone, and wont be providing the source code, so I have provided an .xml document which I hope they'll be able to edit after the console app has been compiled.


1 answer

  • answered 2018-01-11 20:37 Anton Gorbunov

    You need click on your project in Solution explorer, select Add File option and choose app.config. When you will rebuild solution file will by added configuration file like your_application.exe.config