当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - IDE complains Config files referenced in ConfigSource attributes do not comply with DotNetConfig.xsd

问题描述:

I find configsource references in the .config-files to be very helpful. However, since these referenced config-files only contain fragments of the entire app.config hierarchy, the IDE complains.

In the app.config file:

 <configuration>

<configSections>

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

</configSections>

</configuration>

(snip)

<valveProfiles configSource="Profiles.config" />

in the Profiles.config:

<customProfiles>

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

</customProfiles>

However, the IDE has associated Profiles.Config file with the DotNetConfig.xsd schema, which expects the "customProfiles" to be declared in the configSections element, which the Profiles.config file does not have.

I am not particularily bothered by this as it basically only affects intellisense and generates misleading tooltips when you point at the blue undersquiggle, but I was surprised that google came up absolutely empty on this. And no, it is not because I included the word "undersquiggle" in my search ;)

分享给朋友:
您可能感兴趣的文章:
随机阅读: