C# ';类型FileConfigurationSource不包含ConfigurationElementTypeAttribute;

C# ';类型FileConfigurationSource不包含ConfigurationElementTypeAttribute;,c#,.net,app-config,C#,.net,App Config,我试图引用的配置文件中包含以下XML: <enterpriseLibrary.ConfigurationSource selectedSource=""> <sources> <add name="AMPS SAV Application" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Pr

我试图引用的配置文件中包含以下XML:

  <enterpriseLibrary.ConfigurationSource selectedSource="">
    <sources>
      <add name="AMPS SAV Application" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXX" filePath="C:\Trusted\Source Code\AMPS\Planning\SAV\Mainline-xdev\Apps\SavFvwEditor\bin\Debug\app.config" />
    </sources>
  </enterpriseLibrary.ConfigurationSource>

我收到错误消息:

“System.Configuration.ConfigurationErrorsException:'类型FileConfigurationSource不包含ConfigurationElementTypeAttribute'。”

当我尝试读取此文件时


我不太清楚那是什么意思。这是否意味着我的代码缺少ConfigurationElementTypeAttribute,并且需要一个?或者它是否意味着它有一个ConfigurationElementTypeAttribute,并且不应该有?有什么明显的方法可以解决这个问题吗

我似乎还记得(以前使用过该库)类似于type属性的东西需要放在任何其他属性之前。你可以试试。听起来你遇到了类型冲突,