代码之家  ›  专栏  ›  技术社区  ›  Martin

app.config 组件

  •  0
  • Martin  · 技术社区  · 15 年前

    我的电脑里有以下内容app.config.

    <configuration>
    <configSections>
             <sectionGroup name="FooGroup">
                  <section
                      name="Foo"
                      type="Bar.FooSection"
                      allowLocation="true"
                      allowDefinition="Everywhere"
              />
              </sectionGroup>
     </configSections>
     ....
    

    我该怎么办?

    1 回复  |  直到 15 年前
        1
  •  1
  •   stakx - no longer contributing Saravana Kumar    15 年前

    我的初步猜测是,您需要将程序集指定为type属性值的一部分,即。 使所提到的 type fully qualified

    TopNamespace.SubNameSpace.ContainingClass+NestedClass, MyAssembly,
    Version=1.3.0.0, Culture=neutral, PublicKeyToken=b17a5c561934e089
    

    (示例) taken from MSDN .)

    你可以省略 Version Culture PublicKeyToken

    ... type="Foobar.FooSection, FooAssembly" ...