更改 .net 应用程序 App.config 的根元素
Change root element of App.config for .net application
App.config 的标准起始块如下所示:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
是否可以将 "configuration" 更改为其他字符串值,例如 "StartingConfiguration"
不,这是不可能的。以 "config" 开头的部分是保留的。你不能命名 ConfigurationSection
"configuration."
无法更改 app.config 的根元素,因为
The application config file is shared with CLR and Windows SxS. SxS
dictates that the root element is , and it should be
without namespace.
App.config 的标准起始块如下所示:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
是否可以将 "configuration" 更改为其他字符串值,例如 "StartingConfiguration"
不,这是不可能的。以 "config" 开头的部分是保留的。你不能命名 ConfigurationSection
"configuration."
无法更改 app.config 的根元素,因为
The application config file is shared with CLR and Windows SxS. SxS dictates that the root element is , and it should be without namespace.