I'm building a Windows Service app that has configuration data stored in App.Config. However, I noticed that when I build my application a AppName.Exe.Config is generated.
Can someone tell me the relationship between these two files? Is the AppName.Exe.Config file what I install with my Windows Service app, instead of the app.config?
Thanks - Randy
Web. Config is used for asp.net web projects / web services. App. Config is used for Windows Forms, Windows Services, Console Apps and WPF applications.
App. Config is an XML file that is used as a configuration file for your application. In other words, you store inside it any setting that you may want to change without having to change code (and recompiling). It is often used to store connection strings.
config are only required, if you have coded your application in such a way that it is explicitly dependent on it. If you have not done this, or have put error handling/default values or actions in place where it can't read the config file, one would assume your application could run without it.
config file is what web application use where a desktop application uses app. config , and it's a good place to put application specific information. You can add keys to the <appSettings> tag, and use them in the application just as you would if you put them in that tag in the app.config file.
App.Config is the file used in your development environment. AppName.exe.config is the app.config file used when your app is deployed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With