0

以下の記事で作業しました。

http://www.jokecamp.com/blog/net-custom-configuration-section-collection-and-elements/

それが言ったことを気に入れば達成できます。しかし、親ノードを削除したいです。以下のようなxmlにしたいです。

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="jobSection"
      type="MyConfiguration.JobSection, MyConfiguration" />
  </configSections>
  <jobSection>
      <job id="1" name="Job Name A" />
      <job id="2" name="Job Name B" />
  </jobSection>
</configuration>

Unrecognized element 'job'.xml が上記のような場合、エラーが発生します。上記の xml でカスタム セクションを定義するにはどうすればよいですか?

4

2 に答える 2

0

あなたの投稿は以下の投稿と似ていると思います。役立つかもしれない投稿を見てください。

カスタム構成セクションを含む構成ファイル内の認識されない要素「Item」

于 2015-01-27T10:48:02.670 に答える