I have a console application with an App.Config with some keys. The user that will use this app needs to change the values of some of the keys before run it.
If a publish my application I don't see the App.Config after install it. How can I add this functionality?
Thanks.
When you publish the application the app.config is transformed into an exe.config. Open up that file and make your edits.
If you installed this program with a click once installer the easiest way to find the file is to just run the app, open the task manager (CTRL-SHIFT-ESC), select the app and right-click|Open file location. You should then find the *.exe.config file in the same folder.
This should help for your understanding:
https://msdn.microsoft.com/en-us/library/ms228995.aspx
specifically: "In a Windows Forms applications (iterchangeable with console in this instance) not deployed using ClickOnce, an application's app.exe.config file is stored in the application directory, while the user.config file is stored in the user's Documents and Settings folder. In a ClickOnce application, app.exe.config lives in the application directory inside of the ClickOnce application cache, and user.config lives in the ClickOnce data directory for that application."
Short version to help: Look into one of these subfolders post deploy if you are using a clickonce publish option- C:\Users\UsersNameGosHere\AppData\Local\Apps\2.0
Outside of getting you up and running for the here and now, If you have specific user designated values that need mods after deployment then you should really look into putting them into user settings rather than app settings.
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