How to edit values of app.config file from another application?Hello everyone,
I have two windows application project says "A" and "B" in same solution. I already sets all key values in app.config file of "A" . Now I got requirement that I have to make one exe says winform contaings textboxes where I have to set all key values for app.config file of "A" . this exe is my project "B". now i tried many ways to get access of config file of project A . but i failed. I also tried with "ConfigurationManager.OpenExeConfiguration(path)" but here needs file path which i could not put hardcoded. I am restricted to put any hardcoded paths.
note: I created setup project and added both projects output so that both projects exes and app.config of "A" will be in same folder so that its easy to locate file.
Is there any way to achieve this.
Please suggest me ,
Thanks to everyone.
Hide Copy Code
<add key="DataSource" value="ADMIN-PC"/>
<add key="DBname" value="DATA_ABHISHEK"/>
<add key="Security" value="True"/>
<add key="UserName" value=""/>
<add key="Passward" value=""/>
<add key="hourrate" value="60"/>
<add key="port" value="2030"/>
I have above config file and i want to change its key values like "ADMIN-PC" by winform app. which contains form tanking text from textbox.