「file」属性を使用してappSettings configセクションを外部ファイルに移動しようとしています。エラー:エラー「ルート要素がファイルを参照するセクションの名前と一致している必要があります」ルート要素がセクションの名前と一致する場合
System.Configuration.ConfigurationErrorsException : The root element must match the name of the section referencing the file, 'appSettings'
問題は、外部ファイルのルート要素が既に 'appSettings'です。 は、ルート「構成」とカスタム設定セクションを使用してみました、そして、それは
外部ファイルTest.config
のいずれかを助けていない
<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
<add key="URL" value="https://www.google.com" />
</appSettings>
メインApp.config
ファイル
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
</configSections>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
</specFlow>
<appSettings file="Test.config"/>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
</configuration>
誰もが私を助けることができるの下にありますこの?
ありがとうございます。