Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# IDE抱怨ConfigSource属性中引用的配置文件不符合DotNetConfig.xsd_C#_Visual Studio 2008_Xsd_App Config_Configuration Files - Fatal编程技术网

C# IDE抱怨ConfigSource属性中引用的配置文件不符合DotNetConfig.xsd

C# IDE抱怨ConfigSource属性中引用的配置文件不符合DotNetConfig.xsd,c#,visual-studio-2008,xsd,app-config,configuration-files,C#,Visual Studio 2008,Xsd,App Config,Configuration Files,我发现.config文件中的configsource引用非常有用。但是,由于这些引用的配置文件只包含整个app.config层次结构的片段,IDE会抱怨 在app.config文件中: <configuration> <configSections> <section name="customProfiles" type="SomeConfigClass, SomeAssembly"/> </configSection

我发现.config文件中的configsource引用非常有用。但是,由于这些引用的配置文件只包含整个app.config层次结构的片段,IDE会抱怨

在app.config文件中:

  <configuration>
    <configSections>
        <section name="customProfiles" type="SomeConfigClass, SomeAssembly"/>
    </configSections>
</configuration>

(snip)

<valveProfiles configSource="Profiles.config" />

(剪报)
在Profiles.config中:

<customProfiles>
    <curveProfile number="-1" name="Cusom1" />
</customProfiles>

但是,IDE将
Profiles.Config
文件与
DotNetConfig.xsd
架构相关联,该架构要求在configSections元素中声明“customProfiles”,而Profiles.Config文件没有


我对此并不感到特别的困扰,因为它基本上只会影响intellisense,当你指向蓝色的下标时,会产生误导性的工具提示,但我很惊讶谷歌在这一点上完全是空的。不,这并不是因为我在搜索中包含了“undersquiggle”一词;)

如果有人还在查看,VS2008不会为自定义配置导入XSD扩展。如果您使用自定义配置,您将收到模式警告,唉,还有欠精确。