There was a problem, but I couldn't find it on the Internet.
In vs2005, if the default app. config file is not read, the custom configuration file is read.
You need to use system. configuration. Configuration A = configurationmanager. openexeconfiguration (configuration file path );
Then I get the deletetoken,
String apppath = system. Windows. Forms. application. startuppath;
String configpath = apppath + "\ docaddin. dll. config ";
System. configuration. Configuration Config = system. configuration. configurationmanager. openexeconfiguration (configpath );
String dbpath = config. appsettings. settings ["dbpath"]. value;
The result shows that the settings set of the deleettings is empty. There is no key-value pair at all.
This is defined in my config file.
<? XML version = "1.0" encoding = "UTF-8"?>
<Configuration>
<Deleetask>
<Add key = "dbpath" value = "D: \ Program Files \ default company name \ setupfordocaddin \ docdb. mdb"/>
<Add key = "machineid" value = "defaultmachine"/>
</Appsettings>
</Configuration>
Last found:
. Appsettings
Configurationmanager. deleettings
Configuration. Different ettings.
The study is continuing.