I want to set the variables in App.config while the windows service is getting installed.
I have seen many people recommending Link :
http://raquila.com/software/configure-app-config-application-settings-during-msi-install/
Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
is not working. Is it a in built code or we need to open and store variables manually?
Have you added the System.Configuration
reference to your project?
After doing so, you have to define the following directive:
using System.Configuration;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.