Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App.Config vs. AppName.exe.Config

Tags:

c#

.net

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

like image 357
Randy Minder Avatar asked May 26 '10 19:05

Randy Minder


People also ask

Is app config the same as web config?

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.

What is app config?

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.

Do I need app config?

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.

What is app config file in MVC?

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.


1 Answers

App.Config is the file used in your development environment. AppName.exe.config is the app.config file used when your app is deployed.

like image 67
Joel Coehoorn Avatar answered Sep 27 '22 20:09

Joel Coehoorn