How do I get intellisense in app.config for a custom section?

前端 未结 2 636
面向向阳花
面向向阳花 2020-12-23 14:03

We have a custom section in my app.config file related to our IoC container class. How can I get intellisense when editing the config file for this section, as well as getti

2条回答
  •  执念已碎
    2020-12-23 15:00

    XML Intellisense will not automatically work for a custom configuration section.

    Visual Studio may report warnings on compilation complaining that the attributes of the custom configuration section are not defined. These warnings may be ignored.

    If you want XML IntelliSense support for a custom configuration section (or if you just want the 'schema not found' warnings to disappear), add the following line to your DotNetConfig.xsd file immediately after the first line (which is typically the second line in the DotNetConfig.xsd file).

    
    

    The DotNetConfig.xsd file can be found in your Visual Studio 8 (or 9) installation directory in the Xml\Schemas subdirectory.

提交回复
热议问题