A custom powerconfig namespace powersettings. Settings
Then an EXE references the DLL and adds configuration items in APP. cinfig.
<Applicationsettings>
<Powerconfig. powersettings>
<Setting name = " Sharedip " Serializeas = " String " >
<Value> 1 . 1 . 1 . 1 </Value>
</Setting>
</Powerconfig. powersettings>
</Applicationsettings>
However, during the execution, the system prompts that the configuration system cannot be initialized. I guess there is a problem with this configuration item, but why does it not return?
After searching, you can find that
<Configsections>
<Sectiongroup must be registered. Otherwise, powerconfig. powersettings cannot be found.
<Configsections>
<Sectiongroup name = " Applicationsettings " Type = " System. configuration. applicationsettingsgroup, system, version = 2.0.0.0, culture = neutral, publickeytoken = b77a5c561934e089 " >
<Section name = " Puppettool. putpetset " Type = " System. configuration. clientsettingssection, system, version = 2.0.0.0, culture = neutral, publickeytoken = b77a5c561934e089 " Requirepermission = " False " />
<Section name = " Puppettool. tolset " Type = " System. configuration. clientsettingssection, system, version = 2.0.0.0, culture = neutral, publickeytoken = b77a5c561934e089 " Requirepermission = " False " />
<Section name ="Powerconfig. powersettings"Type ="System. configuration. clientsettingssection, system, version = 2.0.0.0, culture = neutral, publickeytoken = b77a5c561934e089"Requirepermission ="False"/>
</Sectiongroup>
</Configsections>
the Blue section is actually a section name, which is the same as the preceding section name. This is the application in powerconfig. the config file can also be found. copy the file.